Google Apps Migration

After running an IMAP and SMTP server for the last 10+ years I finally decided to move mail off to the cloud. Here are a couple steps for migrating your existing IMAP account to Google Apps.

Decide Service Level

First off, decide which level of service you need from Google Apps. Have a look here for pricing. If you are a small outfit you can probably get along fine with Google Apps (free) but you may be interested in the Business features. Also, Google offers different pricing for non-profits which you may be able to take advantage of if you qualify.

I had an existing Google Apps account for a liminis sub-domain. Unfortunately, while you can create aliases, it is not possible to change the primary mail domain. In this case I decided to close the test.liminis.net account and create a new one for the main liminis.net domain.

Investigate Migration methods

Unless you are starting with a new domain, you probably have old email and user accounts that you would like to transfer. Take a look here at the different options. Some options are only available for Business level accounts.

In my case, I'm looking for simple method to transfer mail and folders for only two accounts to a free Google Apps account. I will test out both the manual method using a client like Thunderbird and using something like iampsync.

Sign up for your Google Apps account

Well, it's time to get started. As I mentioned earlier I'm going to setup the basic account. You can start here.

Start by entering your domain. In my case, liminis.net.

You will also need to provide a user login and password to get started. I usually have a couple aliases for email which Google has no problem with so pick the username you're most comfortable with- you will be able to add aliases later.

You will also need to to give some contact information, an alternate email address, and agree to the terms of service.

All right, that's it. You now have a Google Apps account and are probably at the Apps Dashboard. Before you do anything else, the next step is to confirm you own the domain.

Confirm Domain Ownership

This is pretty easy. Download the verification file and upload it to the root of your website. There are other methods if that method is readily available to you for some reason.

At this point you should be able to send email to your initial account using the initial alias username@domain.test-google-a.com. This can be used to transfer email up until the time you decide to swing over your mail servers by updating the MX records for your domain -- more on that later. You can also create new accounts and start testing out calendar, drive, and other Google Apps accounts.

Update MX Records

The next step is to start delivering email to the new location. To do that you need to tell the world your new mailservers. This is done by updating the MX records for your domain.

As of 2012-10-27, the current mail servers to use for Google Apps are:

Priority Points to
1 ASPMX.L.GOOGLE.COM.
5 ALT1.ASPMX.L.GOOGLE.COM.
5 ALT2.ASPMX.L.GOOGLE.COM.
10 ASPMX2.GOOGLEMAIL.COM.
10 ASPMX3.GOOGLEMAIL.COM.

Add SPF

If you follow the "Setup" steps in the Google Apps dashboard you will run across the recommendation to use SPF and DKIM to help figh spam for your domain. Start with SPF since it's pretty trivial to configure.

This is a basic TXT record -- update your DNS to include it. Leave the name blank (or @) and set to: v=spf1 include:_spf.google.com ~all

Setup DKIM

Add Users, Aliases (nicknames), and Groups

Migrate Email

All right, You've played around with accounts and drive. Mail is now arriving in he new mailboxes. Time to move some mail. The methods I'm going to use are all considered client-side though we may run the commands from the mail server. As a side note, if you don't need to migrate, don't. Perhaps now is the time to leave behind all those old, useless mailing list posts?

Outlook

Google has a tool expressly for migrating your mail from your account that is configured in Outlook to Google Apps. I don't have Outlook. If you do definitely give it a try.

Using a client like Thunderbird

This is the widely used drag-and-drop method. Linking your email client (usually Thunderbird) to both accounts and then dragging mail from the old to the new account in small enough batches so as to keep things simple and orderly. This method is pretty straightforward so I'm not going to go into detail.

imapsync

Ah. A tool for automatic IMAP sync that also supports Gmail. I've used this tool in the past (it's over 10 years old). If you've got an IMAP server that you can shell into you can run it directly from the server.

Some details here and here go into the details of transferring using imapsync.

In my case, my current setup was a postfix/dovecot setup on Ubuntu 10.4 LTS. It included an older version of imapsync. I began by creating a test account to try some simple migrations.

Setup Phone

For Android, this works perfectly. And supports multiple accounts (!) in case you have both Gmail and Google Apps accounts.