[TriLUG] more spamassassin, procmail, sendmail

Scott G. Hall ScottGHall at BellSouth.Net
Fri Apr 18 04:03:12 EDT 2003


--- Jeremy Portzer wrote:
 > "mbox" format is the name for the standard mailbox format that's been
 > around *nix forever, including the default format used by sendmail.
 > These is the format used by /var/spool/mail/<your login name> and the
 > format used by the files in ~/mail.

see man page mbox(5):  http://guide.yucs.org/cgi-bin/man-cgi?mbox+5

 > (There is traditionally no file extension for this type of file.)

Now there seems to have been one adopted -- at least by Mozilla and a
few other MUAs: .eml (email message list)
Netscape & Mozilla has used the format for a long time -- inherited from
their UNIX roots -- except that Netscape/Mozilla doesn't need a blank
line between each message, but will accept it. I don't know if that
means that .eml files meet the RFC spec or not, but the following was
found on the above UNIX man page: {mbox(5)}

        A reader scans through an  mbox file looking for  From_
        lines. Any From_ line marks the beginning of a message.
        The reader should not attempt to take  advantage of the
        fact that every  From_ line  (past the beginning of the
        file) is preceded by a blank line.

 >                                   It's possible that some people call
 > this format something other than "mbox" -- however the name mbox is
 > used by the UW IMAP/Pine developers whose mail tools I'm most familiar
 > with.

see the following:
http://guide.yucs.org/cgi-bin/man-cgi?mbox+5

mbox(5)

NAME

        mbox - file containing mail messages

INTRODUCTION

        The most common format for storage of mail messages is
        mbox format.  An mbox is a single file containing zero
        or more mail messages.

[...]

COMMON MBOX VARIANTS

        There are  many variants of mbox format.  The  variant
        described above is mboxrd format, popularized by Rahul
        Dhesi in June 1995.

        The original mboxo format quotes only From_ lines, not
        >From_  lines.  As a  result it is  impossible to tell
        whether

           From: djb at silverton.berkeley.edu (D. J. Bernstein)
           To: god at heaven.af.mil

           >From now through August I'll be doing beta testing.
           Thanks for your interest.

        was quoted in the original message.  An  mboxrd  reader
        will  always strip off the quoting.

        mboxcl format is like mboxo format, but includes a Con-
        tent-Length field with the number of bytes in the mess-
        age.  mboxcl2  format is like  mboxcl  but has no >From
        quoting.  These  formats  are  used  by  SVR4  mailers.
        mboxcl2 cannot be read safely by mboxrd readers.

[...]

Also consider the man page for maildir(5):
http://guide.yucs.org/cgi-bin/man-cgi?maildir+5

maildir(5)

[...]

NAME
        maildir - directory for incoming mail messages

INTRODUCTION
        maildir is a structure for directories of  incoming  mail
        messages.  It solves the reliability problems that plague
        mbox files and mh folders.

RELIABILITY ISSUES

[...]

        A machine may have two programs simultaneously delivering
        mail to the same user.  The mbox and  mh  formats require
        the programs to update a single central file. If the pro-
        grams do not use some locking mechanism, the central file
        will be corrupted.  There are several mbox and mh locking
        mechanisms, none of which work portably and reliably.  In
        contrast, in maildir,  no locks are ever necessary.  Dif-
        ferent delivery processes never touch the same file.

        A user may try to delete messages from his mailbox at the
        same moment that the machine delivers a new message.  For
        mbox and mh formats, the user's mail-reading program must
        know what locking  mechanism  the mail-delivery  programs
        use.  In contrast, in maildir,  any delivered message can
        be safely updated or deleted by a mail-reading program.

[...]

HOW A MESSAGE IS DELIVERED

-- you'll want to read this whole section, as it gives the six steps
involved in locking the file and delivering the message.

You'll also want to see the following BSD man page that discusses the
same things:

http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?mail_bsd+1

-- 
Scott G. Hall,
Raleigh, NC, USA
ScottGHall at BellSouth.Net




More information about the TriLUG mailing list