Technical Operation
The process that delivers an e-mail message writes it to a file in the tmp
directory with a unique filename. The current algorithm for generating the unique filename combines the time, the host name, and a number of pseudo-random parameters to ensure uniqueness.
The delivery process stores the message in the maildir by creating and writing to tmp/unique
, and then moving this file to new/unique
. The moving is commonly done by hard linking the file to new
and then unlinking the file from tmp
, but some implementations simply rename
it there. This sequence guarantees that a maildir-reading program will not see a partially written message, as MUAs never look in tmp
.
When the mail user agent process finds messages in the new
directory it moves them to cur
(using rename
- link then unlink strategy may result in having the message duplicated) and appends an informational suffix to the filename before reading them. The information suffix consists of a colon (to separate the unique part of the filename from the actual information), a '2', a comma and various flags. The '2' specifies, loosely speaking, the version of the information that follows the comma. '2' is the only currently officially specified version, '1' being an experimental version. One can only assume that it was used while the Maildir format was under development. The specification defines flags which show whether the message has been read, deleted and so on: the initial (capital) letter of Passed, Replied, Seen, Trashed, Draft, and Flagged. Dovecot uses lowercase letters to match 26 IMAP keywords, which may include standardised keywords such as $MDNSent, and user defined flags.
Read more about this topic: Maildir
Famous quotes containing the words technical and/or operation:
“The axioms of physics translate the laws of ethics. Thus, the whole is greater than its part; reaction is equal to action; the smallest weight may be made to lift the greatest, the difference of weight being compensated by time; and many the like propositions, which have an ethical as well as physical sense. These propositions have a much more extensive and universal sense when applied to human life, than when confined to technical use.”
—Ralph Waldo Emerson (18031882)
“An absolute can only be given in an intuition, while all the rest has to do with analysis. We call intuition here the sympathy by which one is transported into the interior of an object in order to coincide with what there is unique and consequently inexpressible in it. Analysis, on the contrary, is the operation which reduces the object to elements already known.”
—Henri Bergson (18591941)