Where could I find a description of MH files format,
for example, the choice of the filenames.
For mbox file format, could we find something standard
for the "From_" line" ?
In maildir how can we generate the "unique" file name ?
--
~ libEtPan !
'v'
// \\ DINH V. Hoà
/( )\
^`~'^
DINH V. Hoa wrote:
> Does any "official" documentation on existing
> mailbox file formats exists ?
>
> Where could I find a description of MH files format,
> for example, the choice of the filenames.
This one is easy: Source code.
> For mbox file format, could we find something standard
> for the "From_" line" ?
It is From - no colon in the beginning of an e-mail. There
are Perl libs to handle most of the different mailbox formats.
> In maildir how can we generate the "unique" file name ?
man -5 maildir
....
A program delivers a mail message in six steps. First, it
chdir()s to the maildir directory. Second, it stat()s the
name tmp/time.pid.host, where time is the number of sec
onds since the beginning of 1970 GMT, pid is the program's
process ID, and host is the host name. Third, if stat()
returned anything other than ENOENT, the program sleeps
for two seconds, updates time, and tries the stat() again,
a limited number of times. Fourth, the program creates
tmp/time.pid.host. Fifth, the program NFS-writes the mes
sage to the file. Sixth, the program link()s the file to
new/time.pid.host. At that instant the message has been
successfully delivered.
The delivery program is required to start a 24-hour timer
before creating tmp/time.pid.host, and to abort the deliv
ery if the timer expires. Upon error, timeout, or normal
completion, the delivery program may attempt to unlink()
tmp/time.pid.host.
...
hope this helps