Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 am running Ubuntu LTS and have an email server setup. It has been working fine for a couple of years now. However, I will be switching internet providers soon so my modem/router will be getting a new static IP address. What changes do I have to make to my email server configs and/or DNS primary and secondary IP's hosted at to ensure the email keeps working.

share|improve this question

Any MX records and A records associated to your email. Do not forget about your reverse DNS. You might need to have that setup with your new ISP. If your server has a static public IP, that will need to be modified as well.

share|improve this answer

Well, you're going to need to change the MX record for your domain to your new IP address. Likewise with any A records associated with your mail/www/whatever domain names. You're going to get a new IP address from your new ISP, so your DNS records need to point there.

As far as the server itself, if it's running behind a NAT, it probably won't notice a change in the slightest.

share|improve this answer

Get the PTR record for the new address setup to point to your mail server's name.

You should to add the new address to DNS before switching to the new IP. This should be done 2 times the TTL of your DNS in advance. (Setting TTL down to an hour makes this easier. This may need to be done a couple of days in advance.) If you have configured SPF, check that any IP addresses you specified are updated. (Enable both addresses during the transition.)

An alternative is to create an new mail server name and configure this. You will need to change the name you mail server uses in the Greeting message and HELO command if you do this. Add the new MX record using the times for the A records above. Remove the old MX after conversion is done.

Legitimate mail servers will queue messages if your server is temporarily unreachable. Check your IP changeover carefully when you connect to the new ISP. You may want to reboot to verify the change will survive a reboot. (If you are behind a NAT router, you only need to reboot the router unless you also change the server's IP.)

Remove the old IP address from your DNS once you have the switchover done. You can also increase the DNS TTL when you do this.

Check the DNS results from your name servers once everything is done.

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.