For many years I have used MH (FAQ), and more recently nmh, for my email. But while it is very extendible its 1980s origins unfortunately limit its ability to handle the "modern" HTML-filled, graphic-embedded email that is common these days.

I used Thunderbird at my last job and found it reasonably suitable for what I wanted to do. Since I also discovered how to attach multiple identities to one email account in Thunderbird which I need to handle mailing list subscriptions with different addresses, I decided to use Thunderbird again, at least for my personal mail. (For various reasons the past few years has taught me I need more separation between my work and personal email.)

Some custom setup of Thunderbird is needed to make it useful including:

  • Configuring it not to send HTML email by default (Account -> Preferences -> Composition & Email)

  • Fixing the date display format by (a) appropriately setting the "short" date format in the Mac OS X Preferences -> Language & Text -> Formats; and (b) setting mail.ui.display.dateformat.today to 2 (in Preferences -> Advanced -> Config Editor; and confirming that mail.ui.display.dateformat.thisweek and mail.ui.display.dateformat.default are also set to 2). (NOTE: it appears that (a) the system configuration needs changing when Thunderbird isn't running, and (b) the short format needs to be changed before the Thunderbird preferences are changed. See also Mail and News configuration options) (Unfortunately it appears this does not affect the date format when the message headers are displayed :-( That appears to only be settable to the default format, or the raw format (mailnews.use_received_date = true). See also date time format UI add on.)

Migrating mail

My MH mail is stored in local directories on my (old) laptop, one file per message, numbered sequentially; for Thunderbird I want to use IMAP mail stored on my mail server, which uses Courier IMAP and stores mail in Maildir format, one file per message, named "randomly".

Fortunately the mail can be converted very easily as shown by this simple shell script, mh-to-maildir found on Adam Sampson's MiscCode page. I have my own varient mh2maildir which calls safecat directly (because Debian didn't package the maildir command the original script uses).

Usage is:

mh2maildir MHdir Maildir

and it simply copies the files from one directory to the other, giving them new Maildir-compatible names in the process.

Since I have quite a bit of mail (11GB, about 800,000 messages, about 13 years worth) online (and more archived in various places), this conversion process will take some time. I expect to be doing it a bit at a time as required for several (days|weeks|months).