Notes on moving mail system to a new server

Friday, January 18th, 2008

Well I did this some time ago, I still think writing things done may help if I encounter this again.

To move the mail server to another server, and lost mails as less as possible, here is my steps:

- Set your DNS server so your domains get a lower TTL. Do this as early as possible if you have a high TTL before.

- Setup mail server on the new server, use the same settings on the old server, and make sure everything works.

- Sync all the mails from the old server to new server. This takes a long time

- Sync again, this should take a shorter time

- Stop the old mail server

- Do a final Sync

- Start the new mail server

- Update your DNS so the mx record point to the new server

- Done. Check the status and make sure things are OK.

Some note:

- This is for situations that we only have one mail server. If we already have a backup mail server, things will be different.

- We don’t use the priority of mx record here, cause we don’t want in-consistency between the two servers

- Most mail servers will retry for at least 24 hours if they can’t deliver a mail (either because we close down the old mail server or their DNS is not updated yet and can’t find the new server) so as long as TTL is small enough, we are good and no mail should be lost.

Tags: , ,

Post a Comment

You could use <code type="name"> to get your code colorized

Your email is never published nor shared. Required fields are marked *

Close
E-mail It