1mmdf(5) User Manuals mmdf(5)
2
3
4
6 MMDF - Multi-channel Memorandum Distribution Facility mailbox format
7
9 This document describes the MMDF mailbox format used by some MTAs and
10 MUAs (i.e. scomail(1)) to store mail messages locally.
11
12 An MMDF mailbox is a text file containing an arbitrary number of e-mail
13 messages. Each message consists of a postmark, followed by an e-mail
14 message formatted according to RFC822 / RFC2822, followed by a post‐
15 mark. The file format is line-oriented. Lines are separated by line
16 feed characters (ASCII 10). A postmark line consists of the four char‐
17 acters "^A^A^A^A" (Control-A; ASCII 1).
18
19 Example of a MMDF mailbox holding two mails:
20
21 ^A^A^A^A
22 From: example@example.com
23 To: example@example.org
24 Subject: test
25
26 >From what I learned about the MMDF-format:
27 ^A^A^A^A
28 ^A^A^A^A
29 From: example@example.com
30 To: example@example.org
31 Subject: test 2
32
33 bar
34 ^A^A^A^A
35
36 In contrast to most other single file mailbox formats like MBOXO and
37 MBOXRD (see mbox(5)) there is no need to quote/dequote "From "-lines in
38 MMDF mailboxes as such lines have no special meaning in this format.
39
40 If the modification-time (usually determined via stat(2)) of a nonempty
41 mailbox file is greater than the access-time the file has new mail.
42 Many MUAs place a Status: header in each message to indicate which mes‐
43 sages have already been read.
44
46 Since MMDF files are frequently accessed by multiple programs in paral‐
47 lel, MMDF files should generally not be accessed without locking.
48
49 Three different locking mechanisms (and combinations thereof) are in
50 general use:
51
52 • fcntl(2) locking is mostly used on recent, POSIX-compliant sys‐
53 tems. Use of this locking method is, in particular, advisable if
54 MMDF files are accessed through the Network File System (NFS),
55 since it seems the only way to reliably invalidate NFS clients'
56 caches.
57
58 • flock(2) locking is mostly used on BSD-based systems.
59
60 If multiple methods are combined, implementors should make sure to use
61 the non-blocking variants of the fcntl(2) and flock(2) system calls in
62 order to avoid deadlocks.
63
64 If multiple methods are combined, an MMDF file must not be considered
65 to have been successfully locked before all individual locks were ob‐
66 tained. When one of the individual locking methods fails, an applica‐
67 tion should release all locks it acquired successfully, and restart the
68 entire locking procedure from the beginning, after a suitable delay.
69
70 The locking mechanism used on a particular system is a matter of local
71 policy, and should be consistently used by all applications installed
72 on the system which access MMDF files. Failure to do so may result in
73 loss of e-mail data, and in corrupted MMDF files.
74
76 MMDF is not part of any currently supported standard.
77
79 MMDF was developed at the University of Delaware by Dave Crocker.
80
82 scomail(1), fcntl(2), flock(2), link(2), stat(2), mbox(5), RFC822,
83 RFC2822
84
85
87 Urs Janssen <urs@tin.org>
88
89
90
91Unix February 18th, 2002 mmdf(5)