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:
51 From: example@example.com
53 To: example@example.org
65 In contrast to most other single file mailbox formats like
68 there is no need to quote/dequote "From "-lines in
70 mailboxes as such lines have no special meaning in this format.
72 If the modification-time (usually determined via
74 of a nonempty mailbox file is greater than the access-time
75 the file has new mail. Many MUAs place a Status: header in
76 each message to indicate which messages have already been
82 files are frequently accessed by multiple programs in parallel,
84 files should generally not be accessed without locking.
86 Three different locking mechanisms (and combinations thereof) are in
90 locking is mostly used on recent, POSIX-compliant systems. Use of
91 this locking method is, in particular, advisable if
93 files are accessed through the Network File System (NFS), since it
94 seems the only way to reliably invalidate NFS clients' caches.
97 locking is mostly used on BSD-based systems.
99 Dotlocking is used on all kinds of systems. In order to lock an
101 file named \fIfolder\fR, an application first creates a temporary file
102 with a unique name in the directory in which the
103 \fIfolder\fR resides. The application then tries to use the
105 system call to create a hard link named \fIfolder.lock\fR
106 to the temporary file. The success of the
108 system call should be additionally verified using
110 calls. If the link has succeeded, the mail folder is considered
111 dotlocked. The temporary file can then safely be unlinked.
113 In order to release the lock, an application just unlinks the
114 \fIfolder.lock\fR file.
116 If multiple methods are combined, implementors should make sure to
117 use the non-blocking variants of the
121 system calls in order to avoid deadlocks.
123 If multiple methods are combined, an
125 file must not be considered to have been successfully locked before
126 all individual locks were obtained. When one of the individual
127 locking methods fails, an application should release all locks it
128 acquired successfully, and restart the entire locking procedure from
129 the beginning, after a suitable delay.
131 The locking mechanism used on a particular system is a matter of
132 local policy, and should be consistently used by all applications
133 installed on the system which access
135 files. Failure to do so may result in loss of e-mail data, and in
141 .\" /usr/spool/mmdf/lock/home
148 is not part of any currently supported standard.
152 was developed at the University of Delaware by Dave Crocker.
165 Urs Janssen <urs@tin.org>