mmdf(5)
π MMDF β Multi-channel Memorandum Distribution Facility mailbox format β¨
okay bestie, sit down, we're learning the mmdf(5) manual page and it's lowkey iconic π
πΈ NAME πΈ
MMDF β Multi-channel Memorandum Distribution Facility mailbox format π
β¨ DESCRIPTION β¨
so this page is all about the MMDF mailbox format, which some MTAs and MUAs (like scomail(1), hi bestie π) use to keep your mail messages stashed locally.
An MMDF mailbox is literally just a text file holding an arbitrary number of e-mail messages. Each message is a postmark, then the e-mail message formatted according to RFC822 / RFC2822, then another postmark. No cap. π«Ά
The file format is line-oriented β lines get separated by line feed characters (ASCII 10). And a postmark line? It's the four characters "^A^A^A^A" (Control-A; ASCII 1). yes really, that's the whole vibe check.
Here's an example of an MMDF mailbox holding two mails, so you can see it with your own eyes π:
^A^A^A^A
From: example@example.com
To: example@example.org
Subject: test
>From what I learned about the MMDF-format:
^A^A^A^A
^A^A^A^A
From: example@example.com
To: example@example.org
Subject: test 2
bar
^A^A^A^A
now here's the part that's giving main character energy: unlike most other single file mailbox formats like MBOXO and MBOXRD (peep mbox(5)), there is no need to quote/dequote "From " lines in MMDF mailboxes, because those lines genuinely have no special meaning in this format. the way that's such a relief honestly π
If the modification-time (usually figured out via stat(2)) of a nonempty mailbox file is greater than the access-time, congrats, the file has new mail π¬. Lots of MUAs drop a Status: header in each message to show which messages have already been read. iykyk.
π LOCKING π
okay so this is the serious part, pay attention bestie, no scrolling past π
Since MMDF files get accessed by multiple programs in parallel all the time, MMDF files should generally not be accessed without locking. periodt.
Three different locking mechanisms (and combos of them) are in general use:
fcntl(2)locking β mostly used on recent, POSIX-compliant systems. Using this one is, in particular, advisable if MMDF files are accessed through the Network File System (NFS), since it seems to be the only way to reliably invalidate NFS clients' caches. πflock(2)locking β mostly used on BSD-based systems.
If you're combining multiple methods, implementers should make sure to use the non-blocking variants of the fcntl(2) and flock(2) system calls, so you don't end up in a deadlock. π
If multiple methods are combined, an MMDF file must not be considered successfully locked before all the individual locks were obtained. And when one of the individual locking methods fails, an application should release all the locks it acquired successfully, and restart the entire locking procedure from the beginning, after a suitable delay. it's giving careful and responsible, we love to see it β¨
β οΈ The locking mechanism used on a particular system is a matter of local policy, and should be consistently used by all applications installed on the system which access MMDF files. Failure to do so may result in loss of e-mail data, and in corrupted MMDF files. π± like, actually, be careful.
π CONFORMING TO π
MMDF is not part of any currently supported standard. it's a rebel, it's uncharted, it does its own thing π¦
π°οΈ HISTORY π°οΈ
MMDF was developed at the University of Delaware by Dave Crocker. legend behaviour honestly π
π SEE ALSO π
scomail(1), fcntl(2), flock(2), link(2), stat(2), mbox(5), RFC822, RFC2822
π AUTHOR π
Urs Janssen <urs@tin.org>
okay that's the whole page bestie, you ate that π
this was mmdf(5) from the Unix User Manuals, dated 2002-02-18 β mwah, thanks for reading, ily, go lock your mailboxes π
β¨
π¦ where this page comes from
- alpine 3.24: neomutt-doc 20260504-r0 Β· GPL-2.0-or-later
- debian trixie: neomutt 20250510+dfsg-2 Β· GPL-2.0-or-later
- fedora 43: neomutt 6:20250905-1.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-Public-Domain
- fedora 43: neomutt 6:20260616-1.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-Public-Domain
- fedora 44: neomutt 6:20260105-2.fc44 Β· GPL-2.0-or-later AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-Public-Domain
- fedora 44: neomutt 6:20260616-1.fc44 Β· GPL-2.0-or-later AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-Public-Domain
- nixos 26.05: neomutt 20260105
- nixpkgs unstable: neomutt 20260616
- opensuse-leap 16.0: neomutt 20240425-bp160.1.16 Β· GPL-2.0-or-later
- opensuse-leap 16.0: neomutt 20240425-bp160.1.16 Β· GPL-2.0-or-later
- opensuse-leap 16.0: neomutt 20240425-bp160.1.16 Β· GPL-2.0-or-later
- opensuse-leap 16.0: neomutt 20240425-bp160.1.16 Β· GPL-2.0-or-later
- ubuntu questing: neomutt 20250510+dfsg-2
- ubuntu resolute: neomutt 20260105+dfsg-1build1 Β· GPL-2.0-or-later
- ubuntu stonking: neomutt 20260616+dfsg-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms