Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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:
mydomain.co.uk.            86400   IN      MX      10 mydomain.co.uk.
mydomain.co.uk.            86400   IN      MX      20 mx1.mythic-beasts.com.
mydomain.co.uk.            86400   IN      MX      20 mx2.mythic-beasts.com.
share|improve this answer

Your Answer

 
discard

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.