10/Jun/2007 17:52
In this case, the server was running uw-imapd, so the first step was to turn the OE proprietary folders into MBOX files. Fortunately, Thunderbird provides an import plugin for OE and uses MBOX as its native format..
Unfortunately, Thunderbird adds some junk to the plain MBOX files, like .msf files, zero-length mailboxes, and empty directories. I didn't need them, so I removed them by running these commands from the root of the mailbox hierarchy:
find . -name "*.msf" -print0|xargs -0 rm find . -size 0 -print0|xargs -0 rm find . -type d -print0|xargs -0 rmdirAlso, at least in the case of importing from OE, Thunderbird produces MBOX files that break RFC. Here's how an MBOX message header line should look:
From fakeuser@fakedomain.com Tue Jun 5 07:32:51 2007And here's what the imported MBOX message headers look like:
From - Mon Jan 1 00:00:00 1965I wasn't even able to pin down what all's wrong with the second example. I just ended up swapping out all of them for a known-good header, using this script:
#!/bin/sh perl -i -pe 's/From - Mon Jan 1 00:00:00 1965/From fakeuser\@fakedomain.com Tue Jun 5 07:32:51 2007/' "$1"Which I ran on all the MBOX files in the hierarchy.
IFS=' ' for i in `find . -type f`; do convert-from-tbird "$i" donePity the poor end user who tries to attempt such a Herculean feat.