Skip to content
Mbox Viewer

mboxrd / mboxo

From-quoting · mboxcl2

The MBOX family's variants, which differ in how they protect body lines that begin with "From ". mboxrd escapes them reversibly; mboxo does not; mboxcl and mboxcl2 use a Content-Length header instead.

In an MBOX file, a line starting with "From " marks the beginning of a new message. That creates an obvious problem: what if a message body contains such a line, in a quoted reply or a code sample? The variants of the format are the different answers to that question. mboxo prefixes the offending line with a > character. mboxrd does the same but also escapes lines that already begin with >From, adding another >, which makes the transformation reversible — you can always recover the original text. mboxcl and mboxcl2 take another route entirely, recording each message's length in a Content-Length header.

This matters more than it sounds, because not every program that ever wrote your mailbox followed the rules. A file may well contain an unescaped body line starting with "From ". Any tool that splits an archive by searching for that pattern will tear such a message in two, turning one email into two half-emails without warning.

It is the main reason to treat mbox files as mail rather than as text: parse them, select whole messages, and check that the message count before and after a split still matches. Mbox Viewer and mboxShell read every variant of the family, so you do not need to know which one produced your file.

Related terms

Read your MBOX files on Mac and Windows