[svlug] mh-maildir -> mbox conversion
Brian J. Tarricone
bjt23 at cornell.edu
Sun Oct 4 15:12:06 PDT 2009
I recently switched back to Thunderbird (the v3 betas are pretty nice)
from claws-mail, and wanted to convert my local folders back.
I wrote a little script that just concatenates all the mail files in
each folder, adding a "From <$EMAIL> $DATE" header, and "escaping" any
lines in the message bodies that start with "From " with a "> ".
I then dumped the resulting files into the appropriate folder inside my
Tbird profile, and fired it up.
Unfortunately it only sorta worked. Some folders show as empty that
should have messages in them, and other folders show some messages, but
many (most) are missing. I've visually inspected some of the mbox
files, but they look ok, I think.
Are there any quirks to the mbox format that Tbird uses that might be
causing the problem? ... or maybe I'm missing something else?
 I was hoping to find something pre-made to use, but it looks like
most scripts I can find either convert you *away* from mbox format, or
convert from the more-popular maildir format, not from mh-maildir. My
script is here:
More information about the svlug