Hosting

Moving mail when you change hosting, step by step

The most expensive mistake in a hosting move happens on day one: the MX record is changed first, and the mail is sorted out afterwards. Hours of messages land in a mailbox nobody reads any more.

One rule: mail first, DNS second

The MX record tells the whole internet which server accepts mail for your domain. While it points at the old host, messages go there — and that is good, because it gives you time to move the archive calmly.

Change MX first and the unpleasant part starts: new mail lands on the new server, old mail stays on the old one, and some senders keep using a cached answer for hours or days. You end up with two live mailboxes and a manual merge.

The right order is the reverse: create the mailboxes, migrate the mail, confirm it is all there, and only then switch MX. By that point the archive is already waiting on the new side.

The sequence

The full domain move without losing messages. Steps one to three can happen a week ahead; they change nothing for your users.

  1. Create the same mailboxes on the new host with the same addresses. Temporary passwords are fine — change them later.
  2. Lower the MX record TTL to 300 seconds at least a day before the switch, otherwise the old value lives in other resolvers for as long as it said it would.
  3. Run the first migration pass. It is the long one; let it run overnight, it does not disturb working mail.
  4. Compare message counts per folder on the old and the new server.
  5. Point MX at the new host and wait for the change to propagate.
  6. A day later, run a second pass. It catches up whatever reached the old server during the switch and takes minutes.
  7. Leave the old mailboxes untouched for another couple of weeks — free insurance.

What else moves besides messages

An IMAP migration copies messages and folders. Everything else lives elsewhere and moves separately.

If MX has already been switched

Not a disaster, just a different order. Migrate from the old server to the new one as usual — the old mailbox is still there, and IMAP access to it normally survives the MX change.

What matters is not deleting the hosting account before the archive has moved and been checked. That is the step where mail is genuinely and permanently lost.

FAQ

Common questions

How long can mail keep arriving at the old mailbox after an MX change?

As long as the record TTL was before you lowered it — a full day at many hosts. That is why you lower it in advance.

Will the second pass create duplicates?

No, it compares the destination and copies only what is missing.

Do I have to stop using mail during the migration?

No. The migration reads from the old server and writes to the new one; the mailbox stays usable throughout.

The new host answers with a certificate error

Common while the mail domain still does not point at the new server and the certificate carries the hosting name. There is a full write-up of that error.

Where to next

Move your mail with MoveMailbox

More posts

Find out how big your mailbox is. It costs nothing.

Connect two servers, look at the size and decide. Or take the client and keep everything on your side.

Code on GitHub · built on imapsync · no sign-up