What happens to mail delivery during an MX switch
How to read the Received trace headers
Received: header to the very top of the email's raw text. Because each hop adds its stamp to the top, the header list is read in reverse chronological order: the oldest hop is at the bottom, and the most recent hop (the server that finally put the message into the recipient mailbox) is at the top.
When you open the raw message source in any webmail client or desktop application, scroll past the metadata until you locate the block of Received: lines. To identify which server accepted the message from the outside world, look at the hop that sits directly above the sender's origin.
TEXT
Received: from mail-sender.example.com (mail-sender.example.com [198.51.100.25])
by mx1.yournewdestination.com (Postfix) with ESMTPS id 4StyB3201
for <[email protected]>; Wed, 18 Oct 2023 14:22:10 +0000 (UTC)
Received: from client-pc ([203.0.113.10])
by mail-sender.example.com with ESMTPA id 98AbC
for <[email protected]>; Wed, 18 Oct 2023 14:21:58 +0000 (UTC)[203.0.113.10], which handed it to mail-sender.example.com. That sending server then delivered it across the internet to mx1.yournewdestination.com at IP 198.51.100.25.
By checking the hostname following by and confirming its IP address, you can tell immediately whether that specific message arrived through your old server's mail transfer agent (MTA) or your new host. If the by field contains your previous cPanel server, Plesk instance, or legacy VPS hostname, the remote sender's resolver was still using the cached legacy MX record.
Common pitfalls when diagnosing delivery locations
dig or nslookup and assuming everyone else on the internet sees the same result. Running dig MX yourdomain.com against Google Public DNS (8.8.8.8) or Cloudflare (1.1.1.1) only verifies what those specific public resolvers see. It tells you nothing about the local ISP resolver used by an external client in another region.
Another point of confusion comes from email clients configured with IMAP. If a user sets up an email client using a generic hostname like mail.yourdomain.com, and that mail A record changes along with the migration, their mail client might abruptly switch to fetching from the new server while old messages remain sitting unread on the old server's disk. The user reports that half their mail is missing, when in reality the missing messages arrived at the old host and were never synchronized across.
Similarly, when modifying nameservers rather than just individual MX records, registrar-level caching takes significantly longer. While an individual MX record might have a TTL of 300 seconds, nameserver delegation records (NS records) cached at root and TLD levels often carry TTLs of 24 to 48 hours. If the old nameservers host outdated MX records, resolvers asking the old nameservers will continue directing mail to the legacy server until the delegation cache fully flushes.
When debugging delivery paths across infrastructure changes, it is also worth checking forward-confirmed reverse DNS to stop sudden mail bounces on the new MTA, as outbound replies sent from the new server may be rejected by third-party filters if PTR records do not match the new hostname.
How to safely verify and test the cutover
/var/log/maillog or /var/log/mail.log) to observe live connection attempts:
BASH
# Watch inbound SMTP connections in real time on the target host
tail -f /var/log/maillog | grep -E 'connect from|client='Received: header of that delivered message will identify the exact relay path.
The safest way to handle this transition is to leave the mail service active on the old server for at least 48 to 72 hours after updating MX records. If you shut down the old mail server the moment you update DNS, any sender whose local resolver has not refreshed its cache will receive a connection refused error or a hard bounce instead of delivering the message to the fallback mailbox.