3 .\" Author : U. Janssen
4 .\" Created : 2002-02-18
6 .\" Notes : needs a lot of work
8 .TH mmdf 5 "February 18th, 2002" "Unix" "User Manuals"
11 MMDF \- Multi\-channel Memorandum Distribution Facility mailbox format
14 This document describes the
16 mailbox format used by some MTAs and MUAs (i.e.
18 to store mail messages locally.
22 mailbox is a text file containing an arbitrary number of e-mail messages.
23 Each message consists of a postmark, followed by an e-mail message formatted
24 according to \fBRFC822\fP / \fBRFC2822\fP, followed by a postmark. The file
25 format is line-oriented. Lines are separated by line feed characters (ASCII
26 10). A postmark line consists of the four characters "^A^A^A^A" (Control-A;
29 Example of a \fBMMDF\fP mailbox holding two mails:
35 From: example@example.com
37 To: example@example.org
43 >From what I learned about the MMDF-format:
50 From: example@example.com
52 To: example@example.org
64 In contrast to most other single file mailbox formats like
67 there is no need to quote/dequote "From "\-lines in
69 mailboxes as such lines have no special meaning in this format.
71 If the modification-time (usually determined via
73 of a nonempty mailbox file is greater than the access-time
74 the file has new mail. Many MUAs place a Status: header in
75 each message to indicate which messages have already been
81 files are frequently accessed by multiple programs in parallel,
83 files should generally not be accessed without locking.
85 Three different locking mechanisms (and combinations thereof) are in
89 locking is mostly used on recent, POSIX-compliant systems. Use of
90 this locking method is, in particular, advisable if
92 files are accessed through the Network File System (NFS), since it
93 seems the only way to reliably invalidate NFS clients' caches.
96 locking is mostly used on BSD-based systems.
98 Dotlocking is used on all kinds of systems. In order to lock an
100 file named \fIfolder\fR, an application first creates a temporary file
101 with a unique name in the directory in which the
102 \fIfolder\fR resides. The application then tries to use the
104 system call to create a hard link named \fIfolder.lock\fR
105 to the temporary file. The success of the
107 system call should be additionally verified using
109 calls. If the link has succeeded, the mail folder is considered
110 dotlocked. The temporary file can then safely be unlinked.
112 In order to release the lock, an application just unlinks the
113 \fIfolder.lock\fR file.
115 If multiple methods are combined, implementors should make sure to
116 use the non-blocking variants of the
120 system calls in order to avoid deadlocks.
122 If multiple methods are combined, an
124 file must not be considered to have been successfully locked before
125 all individual locks were obtained. When one of the individual
126 locking methods fails, an application should release all locks it
127 acquired successfully, and restart the entire locking procedure from
128 the beginning, after a suitable delay.
130 The locking mechanism used on a particular system is a matter of
131 local policy, and should be consistently used by all applications
132 installed on the system which access
134 files. Failure to do so may result in loss of e-mail data, and in
140 .\" /usr/spool/mmdf/lock/home
147 is not part of any currently supported standard.
151 was developed at the University of Delaware by Dave Crocker.
164 Urs Janssen <urs@tin.org>