Re: mbox mail file format



Henrick Hellström wrote:

Most mail clients, including Thunderbird, store email sequentially in
a giant text file,

This is 'mbox format'. I believe the other is called the 'maildir
format' where each mail item is stored as individual files. Outlook
Express uses the latter.

There used to be a very heated discussion about which format was better
suited for real life apps --servers, at the time-- and despite the
speed drawbacks maildir won on the grounds that it was safer. A
corrupted file would not bring the whole thing down; plus, flise size
issues.

Thunderbird (and, possibly some others) still use mbox format which can
happen to get corrupted somehow, leaving the users (me, in this case)
high and dry.

where each email appear in a format you can parse with practically
any
MIME parser available.

This is true, of course. But the devil is in the details. I have no
idea how close Thunderbird follows the relevant RFC (for mbox format),
plus it would be much easier if someone else had done the leg work of
taking care of handling attachments, multi-part stuff; and character
codepage issues which can be quite a bit of a head ache.

{I have done some work on this about 9 years ago. Trouble is my code is
buried somewhere in some app.}

The hard part is probably to figure out where each email ends and
the next begins, but it is probably not that hard.

This is the easier part.

In addition, TB 2.0 has a .msf file that appears to be some sort of
index over which email are unread or flagged some other way.

MSF (Mail Summary File) is a Thunderbird-peculiar file. It's there to
speed up some operations (mainly, loading Thunderbird).

These MSF files can be deleted (Thunderbird not running) without a
thought.

Indeed, Thunderbird people suggest we do just that as the first thing
to do in the cases where Thunderbird acts weird.

Now.. Having said all that, I do still hope someone else has code to
share that handles mbox format to save me going years back and
researching RFCs and covering deviations from them :)
.



Relevant Pages

  • Re: Import IMAP-mailboxes from Windows-Thunderbird to Eudora
    ... mail files from Thunderbird into Eudora. ... Using the Import function in Eudora, I specified the mail program as ... supppoed to be using the mbox format too. ... Mail: echo 36199371860304980107073482417748002696458P|dc ...
    (comp.mail.eudora.mac)
  • Re: ANSI C mbox library?
    ... emails e.g. in Thunderbird) in ANSI C (cross platform is key)? ... mbox format is simple text, delimited by a ...
    (comp.lang.c)
  • Re: Export Entourage in Thunderbird
    ... > Is there a plugin or an extension or other things to import Email from ... Doesn't thunderbird use MBOX format? ... simply drag a folder full of messages to the desktop - it will create ...
    (microsoft.public.mac.office.entourage)
  • mbox format ruining IMAP?
    ... I run pcpine 4.64 on a win98 system. ... I converted my local folders ... Thunderbird has more powerful searching and can search ... Sure enough the message was saved in mbox format. ...
    (comp.mail.pine)
  • Re: deleteing e-Mail, quota and dovecot
    ... >> the hard limit and the user isn't able to delete messages. ... With mbox format there isn't much choice but to copy the whole ... use maildir format instead and procmail knows how to deliver ... The conversion might be a little drastic, though, ...
    (Fedora)