Aaron Kelly's Blog

Exporting the MBOX contents

The contents of MBOX files are just plain text, which has advantages:

and disadvantages:

There must be a better way to index this MBOX file!

I’ve looked to some email clients to see how good their MBOX support was, and whether they offered tools to easily work with them.

Claws Mail

I tried Claws Mail, and although initially it was able to index all the email and present a search interface, it choked heavily whenever I tried to search it. I never completed a successful search.

Thunderbird

Next up, Thunderbird, and I struggled to find out how to import a MBOX at all in the first place (it’s an addon, ImportExportTools NG). Also, when I finally installed it, when clicking the Import mbox file item, it did nothing. Turned out I had to setup an email accound first, in order to access the Local folders screen.

After the import finished, the search seemed to work, and I was able to sort the email items fairly quickly. Performance seemed good!

It offered the ability to export all messages as plain text+attachments, which was great. My first export failed at 240/250k mails though, which was very annoying! I struggled to make any progress until I refined my export settings, by exporting a new MBOX file per-year into its own folder. this way I’d be breaking the problem up into smaller chunks.