Skip to content

Why outbound mail starts going to spam after a server migration

After a cPanel server migration, outbound mail often starts landing in spam. Here is what changes at the DNS and IP layer, and how to restore deliverability.

The morning after a cPanel migration, the client emails: their invoices are landing in Junk at Outlook, their staff replies aren’t reaching Gmail inboxes, and a few addresses are bouncing outright. Nothing about the application changed. The mail itself is identical. What changed is the IP address it ships from and, almost always, the DNS records that authorise that IP to send on the domain’s behalf.

What’s happening

When the sending IP changes, three things go wrong in parallel. The new IP has no reputation history at Gmail, Outlook, or Yahoo — it is treated as cold until enough successful deliveries accumulate. The SPF record still authorises the old server’s IP, so every message fails SPF on the new host. DKIM keys may have been regenerated on the destination but the DNS still serves the old public key. DMARC, if enabled, will start rejecting the messages outright because both SPF and DKIM fail alignment.

How to verify

Check what your sending IP looks like to the outside world:

exim -bp | head
dig +short TXT example.com | grep spf
dig +short TXT default._domainkey.example.com
dig +short TXT _dmarc.example.com

Compare the IP in the Exim queue against the IPs listed in the SPF record. Pull a recent message header from a test send to a Gmail address — Authentication-Results will tell you which check failed. For reputation, query the IP against the major lists:

dig +short <your-ip-octets-reversed>.zen.spamhaus.org

A returned record means a listing.

The fix

Update SPF to reflect the new IP (or the new server’s hostname) and remove the old host. Republish DKIM with the destination server’s public key — WHM’s Email Deliverability tool generates the exact TXT record. If DMARC is enforcing, drop the policy to p=quarantine temporarily while authentication stabilises, then return to p=reject. Warm the new IP gradually: do not blast the full daily volume on day one. For blocklist removals, file delisting requests with the listing service directly — most resolve within 24 hours if the underlying cause is fixed.

The structural fix is a pre-migration DNS checklist with TTLs lowered 48 hours ahead of cutover. We run that as part of deployment management.