This format originated with exim. Each message is written as two unique filenames ending in .env and .msg. The .env contains the message envelope, and the .msg file contains the actual message. When an email is delivered, the email header is created with the suffix .tmp, and the message is created with .msg. When the .msg file is completed, the .tmp file is renamed to end in .env. Programs wishing to access an email must wait for both files to be present, or for the absence of the .tmp file.