On Thu, 16 Mar 2006, Richard Westlake wrote:
Does anything else use same mbx file format?
The mbx format is private to the UW c-client library, used by UW imapd,
ipop3d, mailutil, and of course Pine. It was designed by me, and is a
descendant of the mailbox format used on the Tenex and TOPS-20 systems of
the 1970s and 1980s.
I have heard rumors of a version of postfix that knows how to append in
mbx format; but I do not (will not, can not) promise that it will work
today or in the future.
2) Repairing corrupt mbx format files.
Have you read this particular FAQ?
http://www.washington.edu/imap/IMAP-FAQs/index.html#7.15
3) One-off bulk conversion of UNIX mbox format files to mbx format.
I have used "mailutil copy" for this, however it discards, the X-Keyword:
flags it doesn't recognise (e.g. Junk, NonJunk, $Forward, $MNDSent).
Hmm; mailutil is supposed to create the keywords as needed. Do you have
the most recent version?
The first 2048 bytes of the file are the mbx header, which starts with
*mbx*
ttttttttnnnnnnnn
flag-1
flag-2
flag-3
.
.
.
where
tttttttt is a time value; this doesn't seem to change, so I think it is when
the file was first created?
tttttttt is the IMAP UIDVALIDITY. It is set to the UNIX date when the
file is created, and normally won't change; but if the UID regime ever
gets invalidated (shouldn't happen) then a new UIDVALIDITY will be
assigned
nnnnnnnn it the largest message UID used in the file
More accurately, it's the last-assigned UID. This always increases; it
never gets smaller, even if the message with that UID is expunged.
flag-1, flag-2, are locally defined flags. e.g. Junk, NonJunk, $Forward,
$MNDSent
Correct. They're what IMAP calls keywords.
Each message starts with a line of the form
dd-mmm-yyyy hh:mm:ss +zzzz,ssss;ffffffffFFFF-UUUUUUUU
All correct. The date is the IMAP INTERNALDATE, the ssss is
What happens if the UIDs get out of sequence or are duplicated, will
imapd replace the UIDs with new ones, in sequence or would this require
outside intervention?
This invalidates the UID regime, which will cause a new UIDVALIDITY to be
assigned and every message issued a new UID.
This is bad juju, since it will cause clients which cause messages to toss
their cache and reload the entire mailbox.
Something that puzzles me, I made a new file by asking the mail client to
save messages in a new folder. The first message starts with the usual line
dd-mmm-yyyy hh:mm:ss +zzzz,ssss;ffffffffFFFF-00000000
Next I have asked the mail client (pine via imap) to open and list this new
folder, the UID is replaced by 00000001
This is old (imap-2004g) behavior. It uses "lazy" UID assignment, in
which the message is delivered with a zero (unassigned) UID and a UID is
assigned and written when the mailbox is opened.
The new behavior (in the development imap-2006) assigns UIDs when the
message is delivered, in order to support the IMAP UIDPLUS extension.
and a hexadecimal number has been
added after the file header and before the first message header. I am
curious, what this number does and how important it is?
This is the most recent UNIX process ID to have written into the file. It
helps when multiple sessions have the file open; it tells other sessions
that the mailbox got written by some other process and it needs to look at
the file.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw