I recently had need to move my email from a VPS to my DreamHost account. I thought I could simply use Thunderbird to copy the folders, but that process didn’t work very well. The DreamHost wiki has an article about importing email, but I wanted to jot down the specific steps. The key was to use imapsync.
# SSH into your DreamHost shell wget http://www.linux-france.org/prj/imapsync/dist/imapsync-1.255.tgz tar zxf imapsync-1.255.tgz cd imapsync-1.255 ./imapsync --host1 mail.oldserver.com --user1 theoden --host2 mail.newserver.com --user2 'theoden@newserver.com' # rerun the above command if the process dies (had to do this like 10 times) # you'll know it's complete when you see a table beginning with "++++ Statistics ++++"
A few notes about this process:
- In my case I was moving mail to the same domain name (i.e., mail.example.com to mail.example.com). Obviously mail.example.com only points to one place, so I used an alias for the old mail domain; an IP address would probably work as well.
- Note that with DreamHost you need to specify the full email address as the username.
- You may have to subscribe to the sync’ed folders before they’ll show up.
- Thunderbird seemed to lose track of my Sent folder after I sync’ed. The Sent folder was present and explorable, but did not have a special icon associated with and sending mail would result in an error about being unable to copy to the sent folder. The problem seems to have gone away once I set the “Maximum number of server connections to cache” to 1.