Email migration strategy – plans & tips


Recently we moved our mail servers from where they’ve been hosted for a few years along with our website, to a shiny new cloud server, dedicated just for email (at the moment).

Email is (still) the life-blood of 21st century communication, despite the rise and fall of varying social mediums. Varying reports put the total number of emails sent per year in the 100s of billions, although there is some debate on just how much of that is spam!

So it was important that the transfer went smoothly, with as little disruption as possible. I followed advice from this useful email migration guide to help with the transfer.
To speed up DNS propagation, remember to change your TTL to something small, but don’t forget that your TTL must propagate too!

First, I setup the new server with mail and smtp server software and created all the relevant mailboxes and forwarders. Importantly I set up a PTR record for the server so reverse DNS lookups would match the mail server name properly.
I used the same mail server software we were using on the old setup, so we didn’t have to worry about compatibility issues when moving emails across to the new system.

Secondly I setup a subdomain (e.g. tempmail.edgeoftheweb.co.uk) on the new server and created forwarders for all the accounts from that subdomain to our actual domain: e.g. info@tempmail.edgeoftheweb.co.uk pointed to info@edgeoftheweb.co.uk

Thirdly, once the DNS records for tempmail.edgeoftheweb.co.uk had propagated round the internet, I backed up all existing emails (including the subscribed folders list and email ID list) on the old server, and moved them to the new server. What I didn’t do at this point, but what I should have done, was to create all the existing IMAP folders (using telnet for example).

Fourth, I setup forwarders on all the email accounts on the old system to redirect mail to tempmail.edgeoftheweb.co.uk. The clever thing was that when emails were received at the new server, it knew to redirect tempmail.edgeoftheweb.co.uk to edgeoftheweb.co.uk, but because it thought edgeoftheweb.co.uk was a locally stored domain name it just delivered incoming emails to essentially a different folder on the new server, rather than sending them back to the old one!

Fifth, I changed our DNS records to point our mail server at the new IP address, and also copied across any additional emails that had arrived since I backed the old server up from the old server to the new server.

Finally, once the DNS records had changed I re-configured our email clients to use the new SSL certificates for the new mail server and new account passwords too!

Having followed those steps we didn’t need to create or setup new email account in our mail clients, we didn’t loose any emails, and our mail clients remained synchronised with the mail server!

NB – to test the new mail server worked OK before DNS changes had been made, I added an entry to my hosts file redirecting our mail server domain name to the new server’s IP address.

jon

Written by jon

Jon is the newest developer in our company, but has blown us all away with his incredible web development talent.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>