Subject: Re: Format of mbx mailbox

From: Raul Dias <[email-masked]>
Date: Thu, 29 Jun 2000 20:32:08 -0300

>On Thu, 29 Jun 2000 11:16:25 -0400, Master wrote:
>> Where can I find a description of the MBX Mailbox Format.
>
>Other than the sources, there is no description of the mbx format.
>
>In general, I discourage people from writing software to manipulate mbx format
>mailboxes.  I recommend that instead, they use c-client.  That way guarantees
>interoperability and data integrity, particularly as mbx format uses database
>type operations.  If an external implementation gets the locking or update
>logic wrong, the result is likely to be damage to the file.
>
>If you like, I can give you a general overview of the format.
>

Hi Mark,

if you don't mind I would like that.

Thank you,

Raul Dias

---

From: Mark Crispin <[email-masked]>
Date: Thu, 29 Jun 2000 23:52:31 -0700 (PDT)

Here's a brief description of the mbx format.  This information isn't enough
to implement software to interoperate with c-client; you should use c-client
if you want to write an application to manipulate mbx format mailbox files.

Mailboxes in the MBX format have a 2048 byte header.  This header starts with
the exact string "*mbx*"; CR LF; UID validity and last assigned UID
represented as a 64-bit hexadecimal value; CR LF; 30 keywords (which may be
empty), each separated by CR LF; and sufficient NULs to pad the header to 2048
bytes.  It is possible that data will be added after the keywords in the
header in the future.

Following the mailbox header are zero or more messages.

Each message starts with a message header, in the form:
	22-May-2000 19:13:34 -0700,5514;000000000001-00000001
where "22-May-2000 19:13:34 -0700" is the internal date, "5514" is the size of
the following message in octets, "00000000" is a bitmask corresponding to the
keywords in the header, "0001" is a bitmask corresponding to system flags, and
"00000001" is the message UID.  Following the message header is a CR LF and
the message, which must be exactly the number of octets in length given in the
message header.

The message text is in Internet format (lines delimited with CR LF, not UNIX
style LF-only newlines).  Note that CR LF line delimiters are used throughout
the mbx format.

mbx format mailboxes are identical on UNIX and NT.