mb2md: convert mailbox to Maildir

The traditional Unix mailbox format -- often called "mbox" -- sucks. Maildir, a format invented by Dan Bernstein of qmail fame, sucks much, much less. Unfortunately, all the tools that I could find to convert mbox files to maildirs suck even more than the mbox format itself. (Eg. they do a bogus/incomplete conversion and then delete the input mbox without warning -- that sort of thing.)

So I wrote my own mbox-to-maildir conversion tool, called mb2md (all the obvious names were taken). Bragging points:


You'll need three things to make it work:

Obviously, you'll need to make sure that the two scripts are executable after you download them:
chmod +x mb2md addtomaildir


Thanks to the following people for patches and so forth:

Share and enjoy!


A couple of people have reported a peculiar problem with mb2md: when formail runs addtomaildir, it runs it as a shell script, not as a Python script. Unsurprisingly, this does not work very well. (Yes, in both cases I told the person to make sure addtomaildir was executable, and in both cases it was.) Unfortunately, since I don't maintain mb2md at all (it's a one-off tool: convert your mailboxes and you're done with it), I have no time to investigate. But there's an alternative: Juri Haberland's mb2md.pl . Give it a try.