Archiving email in Gmail

Finally found the trick – how to move 5 years worth of Thunderbird email archive into Gmail as an online searchable archive (privacy concerns set aside). I tried this before, but somehow it didn’t work quite as smoothly. Here’s the step-by-step

  • Create a gmail account (for now, no mixing with the regular email account)
  • Copy the Mail/ directory (where Thunderbird keeps its mail) to Mail-dovecot/
  • Install dovecot (openSUSE: zypper install dovecot)
  • Modify /etc/dovecot/dovecot.conf:
         mail_location = mbox:~/Mail-dovecot
  • Start dovecot
  • Download and compile imapsync
  • Start syncing with something like this:
         imapsync –host1 z –user1 myuser –passfile1 /path/to/passfile1 \
                          –host2 –user2 \
                          –passfile2 /path/to/passfile2 –ssl2 –split1 1000
  • Sit back, and do something else. At the time of this writing, imapsync had transferred 10,000 email messages into Gmail in about 9 hours.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.