Skip to content

Rolling out DMARC on Cloudflare without losing mail: p=none to quarantine to reject

DMARC enforcement is a dial, not a switch. The Cloudflare-side mechanics of publishing _dmarc, collecting rua reports, and ramping from none through quarantine to reject without dropping legitimate mail.

DMARC is one TXT record at _dmarc.example.com, and the record itself takes two minutes to publish in Cloudflare. The rollout is where domains lose mail: jumping straight to p=reject while some legitimate sender — a billing app, a CRM, an old cron job — still fails SPF and DKIM alignment means receivers start refusing that mail the same hour. The safe sequence is mechanical: publish p=none with a rua reporting address, read the aggregate reports for two to four weeks, fix every legitimate source they expose, then ramp quarantine and reject with the pct dial. This article is the Cloudflare-DNS side of that sequence; the server-side enforcement schedule for cPanel fleets is covered in the DMARC enforcement rollout.

What’s happening

A receiver that gets mail claiming to be from your domain checks two things: does SPF or DKIM pass, and does the passing identity align with the visible From domain. If neither passes aligned, the receiver applies whatever your _dmarc TXT record asks: p=none (deliver normally, just report), p=quarantine (spam folder), or p=reject (refuse at SMTP). The rua= tag tells receivers where to send daily aggregate XML reports — the only honest inventory of who is sending as your domain, including sources you forgot and spoofers you did not know about.

Two scoping tags matter during a ramp: pct= applies the policy to a percentage of failing mail (so p=quarantine; pct=25 quarantines a quarter of failures and leaves the rest alone), and sp= sets a separate policy for subdomains. On the Cloudflare side there is no proxy dimension — TXT records are always DNS-only — so the mechanics are only about getting the record right, publishing exactly one, and changing it in the right order. Cloudflare also offers a free DMARC Management tool (under the zone’s Email section) that gives you a rua destination and renders the XML reports as dashboards, which removes the main excuse for skipping the reporting phase.

What to check first

  • SPF and DKIM exist and pass aligned for every legitimate sender, before any policy above none. DMARC enforcement multiplies whatever authentication state you have.
  • No _dmarc record already exists — or if one does, what it says. Two TXT records at _dmarc make the policy unusable.
  • Where reports will go. A mailbox you actually read, Cloudflare’s DMARC Management address, or a third-party analyzer.
  • Whether subdomains send mail. If bounce. or mail. send, the default (subdomains inherit p=) may be exactly right — or sp= needs to differ.

How to verify

# The policy the world sees
dig +short TXT _dmarc.example.com
dig @1.1.1.1 +short TXT _dmarc.example.com

# Alignment check on a real message: send one, read the destination headers
swaks --to you@your-test-mailbox.net --from app@example.com --server 127.0.0.1

# At the destination:
# Authentication-Results: ...; spf=pass ...; dkim=pass ...; dmarc=pass

While ramping, your evidence is the aggregate reports: each XML file lists source IPs, message counts, and SPF/DKIM verdicts. Any row with real volume that fails both is either a sender you must fix or a spoofer you want blocked — the whole decision comes down to telling those apart.

The fix

  1. Publish the observation record. In Cloudflare: TXT, Name _dmarc, Content:

    v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com

    One record only. If you use an external analyzer’s address, note that reports crossing domains may require the analyzer’s authorization record on their side — their setup page will say so.

  2. Let reports accumulate for two to four weeks. Read them weekly. Cloudflare’s DMARC Management or any analyzer turns the XML into a source list; raw XML works too, just slower.

  3. Fix every legitimate source the reports expose. Add missing SPF includes, enable DKIM signing at each provider, and correct alignment (the From domain must match the domain that passes). This step is the rollout — everything after it is turning a dial.

  4. Ramp quarantine. Change the record, wait a week at each step, watching reports for collateral damage:

    v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc-reports@example.com

    Then pct=50, then pct=100.

  5. Move to reject once quarantine at full percentage has run clean for a couple of weeks:

    v=DMARC1; p=reject; rua=mailto:dmarc-reports@example.com
  6. Decide the subdomain policy. If no subdomain ever sends mail, sp=reject closes that spoofing door explicitly. If subdomains send, make sure their SPF/DKIM stand on their own before tightening sp=.

When this fix is wrong

If your own mail is already failing DMARC at p=none, the record is not the problem and ramping is not the move — fix authentication and alignment first. If the pain is forwarded mail (a recipient’s forwarding rule breaks SPF and sometimes DKIM), that is inherent to forwarding; ARC-aware receivers mitigate it, your policy cannot. And a domain that never sends mail should skip the ramp entirely: publish v=DMARC1; p=reject; alongside an SPF of v=spf1 -all and be done.

Common mistakes

  • Publishing p=reject on day one because a compliance checklist asked for “DMARC enabled”.
  • A rua mailbox nobody reads — the reports are the entire mechanism, not a formality.
  • Two _dmarc TXT records after an old one was never deleted.
  • Ramping pct upward while a known legitimate sender still fails, assuming “quarantine is not that bad”. It is lost mail with extra steps.
  • Forgetting that pct does not apply to p=none — there is nothing to sample when the policy does nothing.

Prevention

Treat the DMARC record like a deployment: staged, observed, reversible. Keep the ramp calendar written down, revisit reports monthly after reaching reject (new SaaS tools appear without warning), and drop back one stage rather than debugging live if volume of legitimate failures spikes. The specification and ecosystem documentation live at dmarc.org, and Cloudflare’s DNS documentation covers the TXT mechanics.

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.