Mailbox Formats

Duane Attaway dattaway at dattaway.org
Fri Oct 10 14:51:43 CDT 2003


On Fri, 10 Oct 2003, Jonathan Hutchins wrote:

> I'm betting that somebody here uses multiple mail clients.  I've been
> wondering which ones use compatible mailbox formats.  For instance,
> KMail seems to store it's mail in a database format of some sort.  Pine
> moves stuff from the mail spool to the user's tree when it opens.  Mail
> actually reads the mail spool, I think.

I believe all mail programs are quite flexible to whatever style you
prefer.  You have a choice.

The mbox style format, which I prefer, is just leaving the spool in the
default location; usually /var/spool/mail/~ If you have over 10,000
messages in your inbox on a slow P120 with 32MB RAM like me, you might see
mbox slowing down when reading mail.  But mbox may faster upon initially
starting your mail client.  Especially if you have a lot of users.
Regardless, Pine uses mbox by default.  Gentoo has the mbox style by
default I believe and can be set or unset with the mbox USE flag.

The maildir style puts everything in ~/.maildir/new  in individual files 
for each mail.  This method is supposed to be more efficient and quicker 
than, say, 16,000 messages in One Big File.  maildir allows easily 
shuffling of read mail files into different folders quickly.  Its easy on 
system resources.  I believe mutt defaults to this.  You can select this 
style of setup for your programs in Gentoo by setting the USE flag to 
"maildir".

I'm sure there are other choices too.  I'm sure there are plenty of 
utility scripts to convert from one mailbox form to another from different 
machines, but never had the need to look at these yet.

mb2md is a Perl script which can take one or more Mbox format mailbox 
files in a directory and convert them to Maildir format mailboxes.  It can 
also convert the /var/spool/mail/uuuu mailspool file into a Maildir.   
This is for Unix/Linux and is public domain.

http://batleth.sapienti-sat.org/projects/mb2md/

There might even be scripts floating around to convert all the files of 
maildir format back to mbox.

Hope that helps.




More information about the Kclug mailing list