How to change the VPS without loosing incoming emails in the meantime?

user232460 asked:

I have to change my VPS provider and so I have to transfer all my files to a new provider. The problem is that it may cause a downtime of up to 24 hours.

In the meantime it’s very likely that my users receive emails. How can I prevent it that new incoming emails are lost?

If I take everything down for some hours and transfer it, automatically sent emails like newsletters or invoices would be still lost because they are rarely resent if the receiving email server is offline.

Human sender are fine because they would see the error message about the failed delivery and try again.

My answer:

If your mail servers are down, senders will keep trying for 3 to 5 days before returning the mail to sender. This includes most mailing lists. While this value is customizable, I’ve never seen any mail server return mail for a temporary failure like that in less than 24 hours.

Sendmail and Postfix both default to 5 days, exim (which is often used by cheap web hosting providers and other mass market providers) defaults to 4 days.

I don’t think you’ll have an issue if you just stop accepting incoming mail, move server, bring the new mail server up and change your DNS records.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.