Tags:
create new tag
, view all tags
See BLT.

There are several different file (and directory) formats used for storing email.

The following was quoted, then "abstracted" from (but most of this is direct quotes, with some stuff snipped): http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/1998-09/msg00219.html

From: Liviu Daia <daia@stoilow.imar.ro> Reply-To: daia@stoilowPLEASENOSPAM.imar.ro To: procmail@informatikPLEASENOSPAM.rwth-aachen.de Date: Tue, 29 Sep 1998 02:45:05 +0300 Message-ID: <19980929024505.548002707@euler.imar.ro> On 28 September 1998, era eriksson <era@iki.fi> wrote: > On Mon, 28 Sep 1998 13:41:28 +0300 (EET DST), I wrote:

Berkeley mbox format: This is a flat file, with no explicit message delimiter in the classical sense. Each line starting with the five characters "From " and preceded by either an empty line or beginning of file is the beginning of a new message. Some exciting more or less incompatible variants of this format exist, however the one used by sendmail is by far the most common these days.

MH format: This is a one-message-per-file format, where a directory forms the folder and the files in it are messages (the only exceptions are control and cache files used by certain MUAs). The file names are (message?) numbers (not necessarily in sequence), or numbers preceded by commas. The files with names starting with commas correspond to deleted messages. Used by the Rand MH system and derivatives, and by Mutt.

MBX format: Not directly understood by Procmail, but there is a patch. Used by Qmail (?). More details welcome. AFAIK, Qmail doesn't handle MBX mailboxes.

Maildir format: Not directly understood by Procmail, but you can call up an external program for each delivery. Used by some IMAP systems. A patch for Procmail is equally available at the Qmail home page. Used by Qmail and Mutt. A Maildir folder is a directory, with three subdirectories named "tmp", "new", and "cur". Messages are written into "tmp", then moved to "new" to commit the delivery. As messages are read, they are moved from "new" to "cur", and renamed to append flags for the message status. These files are "rigid", their contents is not changed when message statuses change. In Maildir folders the files have long, complex names intended to ensure that all filenames are unique, even across different machines. Maildir is the only mail folder format that doesn't require locking.

Note that Mutt can natively read and write both mbox, MMDF, MH and Maildir mailboxes.

What programs use maildir format?

Qmail and the related utilities, ezmlm (a MLM written by the group around the author of Qmail), Mutt, possibly also Exmh. The current maintainers of C-client have announced that they don't intend to support Maildir (the most notable MUA that uses C-client is Pine).

The format of the "From_" lines used by all reasonably recent versions of sendmail (which is the only one that really matters these days IMO) is:

From

where

is an RFC822 address and is a date in ctime(3) format, that is, something like

Mon Sep 21 00:17:46 1998

-- Dr. Liviu Daia e-mail: daia@stoilowPLEASENOSPAM.imar.ro Institute of Mathematics web page: http://www.imar.ro/~daia of the Romanian Academy PGP key: finger daia@stoilowPLEASENOSPAM.imar.ro

Contributors

  • RandyKramer - 24 Jan 2002
  • <If you edit this page, add your name here, move this to the next line>
Topic revision: r1 - 2002-01-25 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look