Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to install a new mail server on my company. Now I'm using a very very very old version of sendmail on redhat. I've installed on a new server, ubuntu with postfix and dovecot. I'm using a 3th level domain that I use for testing purpouse, and added the server's public ip address as MX record and all works perfect.
Obviously I need to maintain the old dns (not the one for testing) and add the new ip server as a new mx record. I know there is the priority for the mx record but I read that sometimes the priority is overlapped (is it true?).
I've so many questions but it's hard right now to explain:)

Can you please tell me what's the best way to handle this situation?

share|improve this question
up vote 1 down vote accepted

You should set up what is called a backup MX relay to accept mail while you do the switch over. This is a mail system that typically has a lower priority than your primary mail server and is just a queue for mail. It will accept mail if your normal mail server is down. You should also shorten the TTL in advance in your DNS records so that when you do the DNS switch it propagates quicker. When the short TTL DNS records have propagated, switch the old email server's IP address for the new email server's IP address (as you don't want new mail going to the old server).

When a mail server tries to deliver mail to a domain, the servers in the MX field with the lowest priority number are tried first. If there are two MX servers listed, and they have the same number for their priority, then they are connected to in a round robin fashion until one of them works.

If you don't want to set a backup MX yourself, you can ask your hosting provider (if you have one) for one instead. My hosting service charges a small nominal fee for me to use their backup MX relays.

I have a 'primary' MX which is my mail server. Their servers will receive my mail instead if it fails and attempt to deliver it to the primary at regular intervals. The results of dig MX look like this:

;; ANSWER SECTION:            86400   IN      MX      10            86400   IN      MX      20            86400   IN      MX      20
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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