Mailing List Message #6434
From: Bill Cole <>
Subject: Re: Accounf file format
Date: Thu, 6 Jul 2000 23:07:02 -0400
To: SIMS Discussions <>
At 6:13 PM -0700 7/6/00, Patric Malm  imposed structure on a stream of
electrons, yielding:

>How can i get any specification about how the account-file is build?
>I want to make a webmail in Tango 2000 and need to know how / what i
>should be looking for... How i should separate hader from body etc...
>Is there any applescript ore something doing this as i can have to
>look how i should solve it etc?!

I know of no existing Applescript for this, but the format is almost
exactly a standard BSD mailbox. Each message starts with a line whose
first 5 characters are "From " and ends with a carriage return which is
either the end of file or followed by another message. Hence everywhere
you see "<CR>From " you are seeing a message boundary between the CR and F.

Essentially a message is made up of the leading 'envelope from' line (the
starting "From .*: line) followed by a standard RFC822 message. The format
of the RFC822 message has some subtleties, but is essentially (and safely)
seen as a series of non-empty header lines, a single blank line, then the

In regex notation the mailbox file looks like this:

(^From .*\r(.+\r)*\r(.*\r)*\r)*
  ^        ^        ^        ^

The carets denote in order the start of the message in BSD format, the
start of the RFC822 message, the start of the body, and the end of the BSD
and RFC822 message.

Clear? I hope so.

Bill Cole
MAPS L.L.C. Consulting Services Group (work) (personal)
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster