Advertisement

Mbox

From Academic Kids

Mbox is the name for several different things, including

Contents

The mbox family of mailbox formats

mbox is a generic term for a family of related file formats used for holding collections of electronic mail messages. In these formats, the messages are concatenated in a single file, with a From line prepended to the beginning of each and a blank line appended to the end of each. The From line begins with the five characters "From ", and may continue with other text.

Unlike Internet protocols for email exchange, mbox was never formally defined through the RFC standardization mechanism. The storage of email is an exercise left entirely to the implementer of the MUA (Email Client).

The family comprises four main different formats, each to varying extents incompatible with the three others. According to a naming scheme developed by Daniel J. Bernstein, Rahul Dhesi, and others in 1996, these are mboxo, mboxrd, mboxcl, and mboxcl2. Their differences from one another stem from their origins in the various different mail tools for the various different flavours of Unix (mboxcl and mboxcl2 have their origins in the file format used by Unix System V Release 4 mail tools, for example), apart from mboxrd, which was invented by Rahul Dhesi et al. as a rationalisation of mboxo and subsequently adopted by some Unix mail tools including qmail.

'From' quoting

Two out of the four mbox variants, mboxo amd mboxrd, locate the starts of messages by scanning for From lines. Thus if the string "From " occurs at the beginning of any line in either the headers or the body of a message (unlikely for the former for correctly formatted messages, but likely for the latter), it must be modified when the message is stored in a mbox mailbox file to prevent the line from being taken as a message boundary. This is typically done by prepending a greater-than sign.

Idiosyncratic variations

In addition to the four varieties mentioned above, there are further incompatible mbox variations employed by some MUAs for their own, private, mail folders:

  • Eudora employs an mboxo variant in which the sender's email address is replaced by the constant string "???@???".
  • The Mozilla family of MUAs (Mozilla, Netscape, Thunderbird, et al.) employ an mboxrd variant with different and more complex From line quoting rules.

File locking

Because more than one message is stored in a single file, some form of file locking is needed to avoid the corruption that can result from two or more processes modifying the mailbox simultaneously, such as in the case (for example) of a mail delivery program delivering a new message at the same time as a mail reader is deleting an existing message.

For historical reasons similar to those that have resulted in the various incompatible file formats, various incompatible file locking mechanisms exist: fcntl(), lockf(), and "dot locking". Because of the mutual incompatibility, because of the problems that these locking mechanisms encounter with network mounted file systems (such as NFS), and because of the inefficiency of and vulnerability to corruption and loss of mailbox contents of various operations (such as deleting a message), mbox mailbox formats have waned in popularity during the past decade in favour of the maildir mailbox format.

Alternatives to mbox

As already mentioned, maildir is one alternative to the mbox family of mailbox formats. Both mbox and maildir store messages in (pretty much) their original Internet Message (RFC 2822) form, in areas directly accessible to the users owning the mailboxes (and, often, subject to those users' disk space quota limits).

Other systems, such as Microsoft Exchange Server and the Cyrus IMAP server store mailboxes in centralised databases managed by the mail system and not directly accessible by individual users.

The rise of Unicode vs. ASCII for text representation presents another area in which the mbox format is showing its age; although, via MIME character encodings such as UTF-8, the Internet Message Format can encode Unicode data quite simply (and often more efficiently in terms of storage space than a UTF-16 mailbox format would).

Example

From microsoft.outlook.imo@ixazon.dynip.com Sat Aug 03 2002
Received: from ... by ... with ESMTP;
Subject: Nonsense
From: <build.9.0.2416@ixazon.dynip.com>
To: <junkdtectr@carolina.rr.com>

>From ancient times, people have been writing letters.

From someoneelse@loa.invalid Sun Aug 04 2002
Received: from ... by ... with SMTP
Subject: Iggeret
To: <you@aoeu.snth>

Ha iggeret hazot niktava blashon ivrit.

External links

de:Mbox

Navigation

Academic Kids Menu

  • Art and Cultures
    • Art (http://www.academickids.com/encyclopedia/index.php/Art)
    • Architecture (http://www.academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (http://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (http://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools