Cloudflare Email Routing is an inbound forwarding service, and it claims a domain’s mail flow completely: enabling it swaps your MX records for Cloudflare’s (route1/2/3.mx.cloudflare.net) and adds an SPF record for its forwarders. From that moment, every inbound message goes to Cloudflare’s routing engine — not to the mail server your mailboxes live on. If that domain had real mailboxes, users see the classic “can send but not receive” pattern within the hour. The conflict is structural, not a bug: one domain, one set of MX records, and Email Routing and a mail server cannot both hold them. You pick one, and this article is the decision plus the walk-back procedure.
What’s happening
MX records answer a single question — where does mail for this domain go — and Email Routing’s enablement wizard answers it with Cloudflare. The wizard does warn about existing MX records before replacing them, but during a quick setup (“I just wanted to forward info@ to my Gmail”) the warning reads like boilerplate. Once enabled, the routing engine delivers per its rules: addresses with a route get forwarded to their verified destination, the catch-all applies if configured, and anything else is rejected at SMTP. Nothing is queued for your old server, because as far as the world’s DNS is concerned, your old server is no longer part of the domain’s mail story.
Meanwhile the mail server itself is perfectly healthy — mailboxes open, webmail loads, and outbound sending still works because sending never consults your own MX. That asymmetry (send works, receive dead, server looks fine) is what makes the incident confusing until someone runs dig MX. Note also what Email Routing is not: it hosts no mailboxes, keeps no copies, and provides no IMAP or SMTP submission — it forwards inbound mail to mailboxes that exist elsewhere. It cannot replace a mail server; it can only replace a mail server’s inbound routing.
What to check first
- What the MX records say right now.
*.mx.cloudflare.netmeans Email Routing owns inbound. - When they changed. The Cloudflare audit log shows who enabled it and when — match against the “mail stopped” timestamp.
- What routing rules exist. Email Routing’s dashboard lists routes and the catch-all; addresses without either are being rejected, not silently dropped somewhere retrievable.
- What the domain actually needs. Forwarding a handful of aliases to existing external mailboxes, or real hosted mailboxes with IMAP? That answer decides everything below.
How to verify
# Who owns inbound right now?
dig +short MX example.com
dig @1.1.1.1 +short MX example.com
# Email Routing's SPF include appears alongside
dig +short TXT example.com | grep spf1
# Your server still answers SMTP directly — proving it is idle, not broken
openssl s_client -connect mail.example.com:25 -starttls smtp -brief
# A test delivery to the domain follows the MX — watch where it lands
swaks --to user@example.com
On the mail server, the inbound log goes quiet at the moment of takeover (tail -f /var/log/exim_mainlog shows no external accepts), while forwarded addresses keep arriving at their destinations via Cloudflare. The inbound-failure triage runbook covers the same symptom when the MX moved for other reasons.
The fix
- Decide which system keeps the domain. Real mailboxes, IMAP clients, retention requirements: the mail server keeps it. Nothing but a few aliases forwarding to mailboxes hosted elsewhere: Email Routing keeps it, and the old mailboxes get decommissioned deliberately.
- To give the domain back to the mail server: disable Email Routing in the dashboard (Email, Email Routing, settings) — the records it manages are locked while it is enabled, so disable first. Then recreate the original MX records pointing at your mail host, and remove
include:_spf.mx.cloudflare.netfrom SPF if nothing forwards through Cloudflare anymore. - Confirm the restoration with
dig @1.1.1.1 +short MX example.com, aswaksdelivery, and the accept line in the server’s mail log. Senders that deferred during the window retry on their own. - To keep Email Routing instead: create a route for every address that must keep working, decide the catch-all policy consciously (forward or reject), verify every destination address, and only then shut down the old mailboxes — exports done, clients repointed. The setup mechanics are in Email Routing: forwarding addresses done right.
- For the hybrid case — forwarding on the apex domain, mailboxes elsewhere — put the mailboxes on a subdomain (
mail.example.comwith its own MX) or a different domain entirely. One hostname’s MX serves one master.
When this fix is wrong
If the MX records still point at your server, Email Routing is not your incident — work the migration-day triage runbook instead. If mail forwarded by Email Routing bounces at Gmail or Outlook while direct mail flows, that is forwarding deliverability (SPF/DMARC interaction on forwarded paths), not the MX conflict. And if someone enabled Email Routing on purpose to migrate away from the server, do not “fix” it backwards — finish the migration forward.
Common mistakes
- Enabling Email Routing to forward one alias, on a domain whose mailboxes live on a cPanel server.
- Assuming Email Routing keeps a copy — rejected or unrouted mail is refused at the edge, there is no quarantine to fish it from.
- Deleting Cloudflare’s MX records manually while Email Routing is still enabled instead of disabling the feature.
- Restoring the MX but leaving Cloudflare’s SPF include in place forever, or removing it while some aliases still forward through Cloudflare.
- Treating Email Routing as a mailbox host and cancelling the mail server before checking that anyone can still read mail.
Prevention
Gate the Email Routing toggle behind the same change control as MX edits, because it is an MX edit. Before enabling it on any domain, run dig MX and answer one question in writing: where do this domain’s mailboxes live, and does anything receive into them? Cloudflare’s Email Routing documentation states the MX takeover plainly — the incidents happen when nobody reads that page first.
Mail that breaks after a DNS move is one of the most common incidents we untangle — Stack Harbor manages the full DNS and mail path under Managed Cloud Ops; book an infrastructure review before the next migration.