Common mbox Variations

Since there is no standard, every implementor seems to have changed the mbox format somewhat. In fact, the mbox format that we described previously is not the original but the most common variation. It is known as “mboxrd” after Rahul Dhesi.

Some of the other mbox-like formats have been used enough to be given names. Here are some examples:

  • The original mbox format (mboxo) only quotes From_lines, not quoted From_ lines. It is rarely used now.

  • mboxcl is mboxo, but with a Content-Length field in the From_line, which provides the number of bytes in the message. It is rarely used, either.

  • mboxcl2 is mboxcl without any From_ line quoting in messages (since the content length is given). It is used in a few Unix MUAs.

  • MMDF is an mbox-like format that uses neither From_ lines or trailing blank lines, but instead surrounds each message with four Control-As (^A^A^A^A). pine also supports this format.

  • The Eudora mail reader uses mbox as described in the previous section but does not add blank lines to the end of messages. It also uses the string ???@??? instead of the sender’s address in From_ lines.

  • Netscape uses mbox format, including blank lines, but uses “-” in place of the sender’s address in From_ lines.

Obviously, if you are attempting to parse an mbox mailbox, you should be careful to write a robust script! You may not know in advance which variation might have been used or whether you can count on items like the sender’s address being present.

Mailboxes of this type are simple to understand and to parse. Unfortunately, they suffer from problems when multiple processes attempt to write a given file simultaneously. This is known as the file locking problem. A good MUA will attempt to lock a mailbox file (e.g., using the common flock call) before writing to it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.83.150