Moving from mailbox format to maildir formats
I store each year's worth of mail in a single large mbox format file. These files have become very, very large over the past few years:
7.7M Oct 27 2004 all-mail-1999 53M Oct 27 2004 all-mail-2000 145M Apr 15 2005 all-mail-2001 203M Apr 15 2005 all-mail-2002 306M Oct 27 2004 all-mail-2003 590M May 5 2007 all-mail-2004 436M Feb 14 2006 all-mail-2005 633M Feb 14 2007 all-mail-2006 728M Jan 10 09:47 all-mail-2007
....so opening a folder and searching it takes typically 10 seconds under Mutt. This is getting to be pretty unacceptable.
So i'm trying a two-pronged attack. Firstly, I'm converting one mbox into a maildir format and check to see how long Mutt can parse it, and then I'll look into mairix, which is an indexer of both mbox and maildir format mailboxes. I want fast searches, dammit!
Here's the first mailbox to maildir converter I've found:
http://batleth.sapienti-sat.org/projects/mb2md/#Download
Run with:
~/Desktop/mb2md-3.20.pl -s /home/mattk/Mail/all-mail-2007 -d /home/mattk/Mail/trymaildir/
NOTE you need the full path specified.
It took about 1.30 mins for 9488 messages.
I read the Maildir with:
mutt -n -m Maildir -R -f trymaildir/
the first time I ran this, it did a rapid read of all the files, then did a much longer scan that took 2 minutes.
Closing mutt and rerunning the same command caused a rapid read in, and it took less than 3 seconds to open.
Limiting searches were much faster compared to mbox BUT any 'body' type search was just as slow as before. Also, the mutt reported all the incoming saved emails as having zero size, although they displayed as expectd.
Wait! Someone recently hacked mutt to do the processing for you. This sounds like a cool solution.
http://foolab.org/node/1737