[plug] Maildir vs mbox

Ben Jensz plug at jensz.id.au
Thu Apr 1 14:23:03 WST 2004

I'm just curious as to what people think the cons / pros are of the two 
mail storage formats?

Basically I've got a new server (IBM x225 - Xeon 3Ghz, 1Gb RAM etc.) to 
build our new email machine with.  But I'm tossing up whether to go with 
mbox as on our old email server, or to go with the Maildir format.  I'm 
using Postfix as the MTA, so either format isn't a problem as I'm pretty 
sure it supports both.  The machine has dovecot on there already for 
pop3/imap support and according to the docs, that also appears to 
support either mbox or Maildirs also.

Now one of the issues we have had with the old server with mbox, is that 
several users have spools that are rather large (i.e. several hundred 
megs), due to leaving copies of messages on the server.  So what has 
become a real issue is that when receiving a new message, it has to 
rewrite this large file again, which does take a bit to do... and then 
of course there is the fact that when they do a POP3 query, it spends a 
bit of time reading the file as well.  So then of course the email 
client may decide to remove certain messages from the server because 
they've been deleted by the user during a POP3 query, so then it again 
has to rewrite this rather large file. 

So all this processing, all this rewriting large files takes a rather 
substantial toll on the system its currently on.  So thats part of the 
reason its being replaced.. other factors are also the age of the 
machine (pushing towards 5 years old now) and I think there may be a 
hardware issue with it (but I'm afraid that if I pull it apart to 
investigate it might not start back up again - so I haven't dared touch 
it whilst its still working).

My understanding of Maildirs, is that they basically write the emails as 
single files into a directory.  So there is no bog down of rewriting 
(potentially) large files constantly.

The disk setup in the new machine at the moment is just two 36.4Gb 10K 
RPM U320 SCSI drives in RAID1.

TIA for any suggestions/comments.

/ Ben

P.S.  Yes, I have read the Maildir vs mbox article on the Courier site.  
Seems a bit biased to me.

More information about the plug mailing list