LLMpediaThe first transparent, open encyclopedia generated by LLMs

mbox

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: Exim Hop 4
Expansion Funnel Raw 68 → Dedup 0 → NER 0 → Enqueued 0
1. Extracted68
2. After dedup0 (None)
3. After NER0 ()
4. Enqueued0 ()
mbox
Namembox
Typemailbox file format
Introduced1970s
DeveloperVarious Unix and email software authors
Extension.mbox
Mimeapplication/mbox
GenreEmail storage

mbox

mbox is a family of plain-text mailbox storage formats used to store collections of email messages as concatenated messages in a single file. It originated in early Unix environments and has been implemented by many Unix, BSD, Linux, Sun Microsystems, Apple Inc., Microsoft and third-party Mozilla Foundation and Gmail-compatible systems. Implementations and tools that read or write mbox files include Sendmail, Postfix, Exim, Procmail, Pine and Mutt, making the format widely supported across Internet Engineering Task Force-era mail software, X Window System-based clients, and cloud services.

History

mbox emerged in the 1970s as Unix mail delivery and local mailbox conventions evolved on systems such as Berkeley machines and early AT&T research systems. Early mail delivery agents like sendmail adopted concatenated-text file storage for simplicity compared with per-message files used by some contemporaries. Over decades, mbox was referenced in operational documentation and informal standards circulated among proponents at USENIX meetings and in RFCs and drafts circulated by the Internet Engineering Task Force. Several mail user agents and mail transport agents standardized on variants to maintain compatibility with legacy utilities such as procmail and archiving tools developed at institutions including MIT and Stanford University.

Format Specification

A conventional mbox file contains messages appended sequentially; each message begins with a "From " separator line that typically contains the envelope sender and a timestamp. The separator line convention was compatible with mailbox utilities on UNIX System V and BSD families. Because the storage is plain text, message headers (for example fields like "From:", "To:", "Subject:"), MIME boundaries specified under Multipurpose Internet Mail Extensions, and message bodies are stored verbatim, allowing interoperability with software following RFC 822 and subsequent RFC 5322 header syntax developments.

Several practical rules evolved: lines beginning with "From " inside a message body must be escaped or encoded to avoid false separators; common escape methods included prefixing with a ">" character or using "mboxo/mboxrd/mboxo2" escaping conventions. Timestamp formats often followed conventions similar to those used by BSD date utilities. Character encoding of message bodies and headers relies on MIME and RFC 2047 conventions; mbox itself does not provide metadata fields or indexing, so tools use file offsets or auxiliary index files created by clients such as Mozilla Thunderbird or Apple Mail extensions.

Variants and Implementations

Multiple incompatible and compatible variants arose, named in practice by the escaping and delimiter rules they adopt. Notable variants include mboxrd, mboxo, and mboxcl, which differ in the way they escape "From " lines and preserve message fidelity. Implementations across systems include the mbox format use in Sendmail, storage backends for Postfix via delivery agents, mailbox formats consumed by Dovecot and Cyrus IMAP support layers, and mailbox import/export utilities in Outlook Express conversion tools. Popular mail clients such as Evolution (software), Sylpheed, Claws Mail, Microsoft Outlook, Apple Mail, Opera Mail, Thunderbird and Eudora provide import/export pathways that either directly read mbox variants or convert to client-specific mailstore formats. System-level implementations adapted mbox semantics for use with Network File System and local filesystem features on distributions such as Debian, Red Hat Enterprise Linux, Ubuntu and FreeBSD.

Usage and Tools

Administrators and power users employ command-line and GUI tools to manage mbox files. Classic Unix utilities like formail (part of the procmail suite), mboxgrep, grep, awk, and sed can extract, search, and transform messages. Mail transfer agents use mbox for local delivery via delivery agents like procmail and maildrop. GUI clients such as Apple Mail, Mozilla Thunderbird, and Evolution offer import/export features; archiving and backup solutions by vendors such as Google (via Google Takeout) and service providers like Fastmail provide conversion to or from mbox. Libraries and programming-language bindings—available for Python (programming language), Perl, Ruby (programming language), and Java (programming language)—expose parsers and writers for automation, while enterprise tools integrate mbox processing into workflows involving Microsoft Exchange or IMAP backends such as Dovecot.

Security and Limitations

Because mbox stores raw messages sequentially without access control or per-message metadata, it presents risks when used on multi-user systems and networked filesystems such as NFS or SMB. Concurrent access contention can lead to corruption unless locked by mechanisms like flock or external mailbox locking daemons; historic locking protocols include dot-locking conventions originating in early Unix mail tools. The lack of integrity checks and absence of encryption mean confidentiality and tamper detection depend on external layers such as OpenPGP and S/MIME; large-scale deployments tend to prefer IMAP stores with per-message records in Dovecot or database-backed backends for transactional integrity. Additionally, message injection and parsing anomalies—exploitable by crafted headers targeting mail clients like Microsoft Outlook or Thunderbird—require cautious parsing and sanitation in conversion utilities.

Category:Email file formats