We are moving one of our smtp servers from one hosting provider (A) to another hosting provider (B). Because of this move, the IP address of the server will have to change.

Our plan is to do the following:

  1. Build clone system at new facility.
  2. Register reverse-dns for new ip ( owned by provider B) address to mail.company.com
  3. Change forward DNS TTL for mail.company.com down to an hour.
  4. Leave things be for three days (Assuming that's how long it would take for the cached records expire / drop off cache) RE: What percentage of nameservers honor TTL these days?
  5. Change forward DNS for mail.company.com to point to provider B's ip address for new system. (plus raise TTL back to 24 hours)
  6. Turn off system at provider's A site a week or so later.

Is this a reasonable plan? Is there anything we can do to minimize the outage for sending and receiving mail? One of the concerns I had for sending email out were those systems that use reverse dns and forward dns to validate that the machine was on the up and up. I thought incoming mail was less of a problem. Am I missing anything in the process?

  1. Do you really need to build a new server as opposed to just moving the old server?

  2. Change the rDNS and A records at the same time. I don't see any value in changing the rDNS ahead of time.

  3. Good idea.

  4. That's not how DNS works. The DNS record doesn't "get out there". DNS is a pull technology not a push technology. You want the TTL to be low enough so that the DNS record is not cached for an inordinately long period of time on servers that have already resolved the DNS record and have it in their cache. Servers that don't have the DNS record in their cache already will get the new DNS information immediately when they perform a lookup for the DNS record.

  5. Good idea, but 24 hours seems a little long to me. I normally set 1 hour as my TTL. It's short enough to allow for quick changes on our part and long enough to not put any undue load on our name servers.

  6. Good idea

DNS records don't propagate, they cache. There's no need to wait until they "get out there" as that's not how DNS works. A mail server that hasn't sent email to you during the period of time specified in the TTL will perform a lookup for the DNS record and will find the new DNS information immediately. Any server that has sent email to you during the period of time specified in the TTL will have the old DNS information in their cache for the life of the TTL. When the life of the TTL expires they'll perform a new lookup and get the new information immediately. Setting the TTL to 1 hour about 24 hours before the planned cutover should be sufficient to reduce your risk of missing some incoming email. In addition, most mail servers will try to send email for a period of 48 hours, so even if a few email servers "miss" you during the cutover, they should keep retrying for 48 hours and deliver the email when they are able to connect.

We do this kind of thing for our customers all the time. We change the DNS records at 8PM on a Friday evening and by 9PM or so email is flowing perfectly to the new server.

  • Wow, thank you for the feedback, I appreciate your time. The server is a VM, so bring up a new instance of it is as cheap as copying it over the internet. The reason I was changing the rdns before-hand is we control dns for our domain, but the CoLo controlls rnds since they own the IP block. I'm giving that much time to execute the request so they don't charge me for emergency changes. – MrSunday Jan 22 '11 at 2:46
  • Actually now that I've thought about it some more, setting up the rDNS record at the new provider won't do any harm. I've edited number 2 in my answer accordingly. – joeqwerty Jan 22 '11 at 2:49
  • I've updated my question to reflect your correction on my terminology (cache expiry vs "get out there") – MrSunday Jan 22 '11 at 3:02
  • Sounds good. Good luck with the move. – joeqwerty Jan 22 '11 at 3:06

That sounds good. Make sure that you list both mail servers as blessed outgoing mail servers in DNS. This includes things like DomainKeys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.