A few days ago I was on a phone conference with a new client (a well-known non-profit, which shall remain nameless for now). They are moving from a hosted Exchange solution over to Google Apps. During the phone conference, we came up with a very clever way to deal with the DNS problem. The DNS problem in question is one of the biggest hurdles with email migration: DNS propagation of the MX-record changes may take up to 48 hours for misconfigured and/or caching DNS servers even if you have a low TTL configured. In the meantime email might go to either your old or your new email provider.

The solution is simple, which makes it great. The key is to have two email addresses on separate domains (sub-domains or separate domains). Since this client was on a hosted Exchange plan, they already had two addresses for these accounts: one for their own domain, and one from the email provider (something like [email protected]). Since both these domains have proper MX-records configured, email can be delivered on both addresses. Fairly straight forward, right? (Phase 0 in the illustration below.)

Now let's move on to the clever part. Since the non-profit was moving to Google Apps, they needed to change the MX-record for their domain to point to Google's servers. This can usually disrupt the flow of email, as depending on if the sender's DNS server is using the new updated MX record or not, the email can be delivered to either the new or the old server. However, since the the email accounts can be reached on two separate domains (and therefor two separate MX-records), we can configure the primary domain to forward the emails to the other domain. In Google Apps this means that you have to create forwarding addresses for every user from [email protected] to [email protected] (Phase 1 in the illustration below.)

Ok, you might think, that just puts us back to square one. Not so fast. What this means is that we do not have to worry about the DNS propagation anymore. We can do this change the weekend before the actual migration and then all we need to do the weekend of the actual migration is to remove the forwarding and set up a real account. Simple and brilliant. You can even break apart the migration into several groups and do one group at the time. (Phase 2 in the illustration below.)

If you do not have a hosted email solution or are moving to Google Apps, you can still use this method. All you need to do is to create a sub-domain on your own domain and configure your email server and MX-record so that you can receive email there too. Setting up a domain alias is fairly straight forward on most SMTP servers. The only thing you need to pay attention to is to make sure that the 'From' address is configured to the primary domain and not the sub-domain.

Migration phases

Smooth email migration

If you have any question or comments, please let me know.

Viktor Petersson
Twitter: @vpetersson