While performing some administrative tasks on one of the domains I maintain, I decided that the time has come to switch to a modern and reliable solution – Google Mail.

If you have an IMAP mailbox hosted somewhere and you want to move it to Google, then do the following (example is set for migrating from Dreamhost, but can be used on any other IMAP mailbox):

1. Register at Google Apps for your domain

2. Re-create your email accounts

3. Log in to  shell on your hosting and execute the following command:

 mailutil transfer -verbose -merge append \
   '{a1.balanced.<your-dreamhost-mail-server>.mail.dreamhost.com\
   /imap/ssl/novalidate-cert/user=<your-dreamhost-username>}' \
   '{imap.gmail.com/ssl/user=<your-gmail-username>}'

<your-dreamhost-username> is the name you use for logging into your existing IMAP mailbox – e.g. info@mydomain.com
<your-dreamhost-username> is the name you use for logging into your Gmail account (just username if you’re migrating to @gmail account or username@domain.com if you’re migrating to Google Apps account

4. Enter first password to your existing IMAP account, then password to your Gmail account

5. Voilà – prepare that this can be a long running operation, especially if you have a lot of mails.

(Thanks to joyjit for advice)

1 thought on “Migrating domain emails to Google Apps mail

Leave a Reply

Your email address will not be published. Required fields are marked *

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