Importing archival email from Thunderbird into Gmail

I am testing the usefulness of dropping my mail archives (currently local to my workstation) into a Gmail account. Not so easy.

  • GMail Loader doesn’t quite do the job, because it forwards it, and in my case, it failed because the mail server I was using didn’t allow for relay services (maybe I configured something wrong, but anyway). Also, it wanted a single Mbox – I had several hundred.
  • gExodus also failed – Windows only.

So I did it the hard way:

  1. Install dovecot (IMAP/POP server). That was easy: zypper install dovecot
  2. Copy my Thunderbird directory to a test directory (just to be on the safe side)
  3. Point dovecot at that directory, with mbox: format. Well, that would have been too easy – it didn’t see anything – possibly because of an incompatible mbox format.
  4. OK, try again: Import Thunderbird email into Kmail (converting it into maildir format)
  5. Point dovecot at the Kmail-converted directory. Failed, too. Turns out, dovecot and Kmail use incompatible maildir formats (if everybody has their own standard, is it really a standard?)
  6. Convert all directories from Kmail’s “.directory/yaya.directory/…” format to dovecot’s “.directory.yaya.directory….” format.
  7. Point dovecot at the Kmail-converted/renamed directory. Failed again.
  8. Move all files from “.directory/.subdir/cur” to “new/”.
  9. Point dovecot at the “new/” root directory (well, actually, again the Kmail-converted area, which has a “new/” subdirectory). THAT worked.
  10. Go to Gmail, open up a couple of ports on the home firewall and the workstation, and let it rip

That took a LONG time. After 15 minutes, Gmail had pulled down 130 messages… I only have a couple of thousand. We’ll see.

Comments

  1. Lars - 16 May 2008 @ 13:13

    Gmail fetches only 200 messages at a time, for now every 10 minutes: ” 200 mails fetched. 23955 mails remaining.” That could take a while: 19 hours to be exact. Oh well.

Leave a Reply