1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
.\" Project : tin
.\" Module : mmdf.5
.\" Author : U. Janssen
.\" Created : 2002-02-18
.\" Updated :
.\" Notes : needs a lot of work
.\"
.TH mmdf 5 "2002-02-18" "Unix" "User Manuals"
.\"
.SH NAME
MMDF
\-
Multi-channel Memorandum Distribution Facility mailbox format
.\"
.SH DESCRIPTION
This document describes the
.B MMDF
mailbox format used by some MTAs and MUAs
(i.e.
.BR scomail (1))
to store mail messages locally.
.PP
An
.B MMDF
mailbox is a text file containing an arbitrary number of e-mail messages.
Each message consists of a postmark,
followed by an e-mail message
formatted according to \fBRFC822\fP / \fBRFC2822\fP,
followed by a postmark.
The file format is line-oriented.
Lines are separated by line feed characters (ASCII 10).
A postmark line consists of the four characters
"\[ha]A\[ha]A\[ha]A\[ha]A" (Control-A; ASCII 1).
.TP
Example of a \fBMMDF\fP mailbox holding two mails:
.PP
.RS
.EX
\[ha]A\[ha]A\[ha]A\[ha]A
From: example@example.com
To: example@example.org
Subject: test
\&
>From what I learned about the MMDF-format:
\[ha]A\[ha]A\[ha]A\[ha]A
\[ha]A\[ha]A\[ha]A\[ha]A
From: example@example.com
To: example@example.org
Subject: test 2
\&
bar
\[ha]A\[ha]A\[ha]A\[ha]A
.EE
.RE
.PP
In contrast to most other single file mailbox formats
like MBOXO and MBOXRD (see
.BR mbox (5))
there is no need to quote/dequote "From " lines in
.B MMDF
mailboxes as such lines have no special meaning in this format.
.PP
If the modification-time
(usually determined via
.BR stat (2))
of a nonempty mailbox file is greater than the access-time,
the file has new mail.
Many MUAs place a Status: header in each message
to indicate which messages have already been read.
.\"
.SH LOCKING
Since
.B MMDF
files are frequently accessed by multiple programs in parallel,
.B MMDF
files should generally not be accessed without locking.
.PP
Three different locking mechanisms (and combinations thereof)
are in general use:
.IP "\(bu"
.BR fcntl (2)
locking is mostly used on recent,
POSIX-compliant systems.
Use of this locking method is, in particular, advisable if
.B MMDF
files are accessed through the Network File System (NFS),
since it seems the only way to reliably invalidate NFS clients' caches.
.IP "\(bu"
.BR flock (2)
locking is mostly used on BSD-based systems.
.PP
If multiple methods are combined,
implementers should make sure to use the non-blocking variants of the
.BR fcntl (2)
and
.BR flock (2)
system calls in order to avoid deadlocks.
.PP
If multiple methods are combined,
an
.B MMDF
file must not be considered to have been successfully locked
before all individual locks were obtained.
When one of the individual locking methods fails,
an application should release all locks it acquired successfully,
and restart the entire locking procedure from the beginning,
after a suitable delay.
.PP
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
.B MMDF
files.
Failure to do so may result in loss of e-mail data,
and in corrupted
.B MMDF
files.
.\"
.\" .SH FILES
.\" /usr/spool/mmdf/lock/home
.\" $HOME/Mail/
.\"
.\" .SH SECURITY
.\"
.SH "CONFORMING TO"
.B MMDF
is not part of any currently supported standard.
.\"
.SH HISTORY
.B MMDF
was developed at the University of Delaware by Dave Crocker.
.\"
.SH "SEE ALSO"
.BR scomail (1),
.BR fcntl (2),
.BR flock (2),
.BR link (2),
.BR stat (2),
.BR mbox (5),
.BR RFC822 ,
.B RFC2822
.\"
.SH AUTHOR
Urs Janssen <urs@tin.org>
|