cheat-sheets

Cloudflare DMARC

DMARC tells receivers what to do with mail that fails SPF and DKIM alignment, and where to send reports. This sheet covers the record, a safe rollout, and Cloudflare’s DMARC Management feature. The basic record is also in Mail Server DNS Records, and TXT handling in Cloudflare TXT Records.

Documentation: Cloudflare DMARC Management · RFC 9989 (DMARC) · RFC 9990 (aggregate reporting)

Verification: the tag list follows RFC 9989, which the research read directly. It obsoletes RFC 7489. The old pct, ri and rf tags are removed in it, and I did not re-read RFC 7489 for their old defaults. Cloudflare’s own rua address was not confirmed (unverified).

The Record #

A TXT record on _dmarc.<DOMAIN>:

text
_dmarc.example.com  TXT  "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
TAGMEANINGDEFAULT
vDMARC1. Must be firstrequired
pPolicy: none, quarantine or rejectnone if absent
spPolicy for subdomainsfalls back to p
npPolicy for non-existent subdomainsfalls back to sp, then p
ruaWhere aggregate reports go (mailto:)none
rufWhere failure reports gonone
adkim / aspfDKIM and SPF alignment: r relaxed, s strictr
foFailure report options0
psdPublic suffix domain marker: y, n or uu
tTesting mode: y or nn

Removed in RFC 9989: pct, ri and rf. A Tree Walk (at most 8 queries) replaces the Public Suffix List lookup. Some receivers still use RFC 7489 behaviour, so older tags may still be honoured.

Rollout #

  1. Start with p=none and a rua address. Read the reports for a few weeks.
  2. Fix any legitimate sender that fails SPF or DKIM alignment.
  3. Move to p=quarantine, then p=reject once reports are clean.

Make sure SPF and DKIM already pass for every service that sends as your domain first. See Generate a DKIM Keypair.

Reports to Another Domain #

If rua points at an address on a different domain, that domain must authorise it with a TXT record at <POLICY_DOMAIN>._report._dmarc.<DEST_DOMAIN> containing v=DMARC1. A wildcard *._report._dmarc record is allowed (RFC 9990).

Cloudflare DMARC Management #

Enable it under Email > DMARC Management > Enable. It works on apex domains only, not subdomain setups, and adds an extra rua address pointing at Cloudflare so it can build reports for you. The exact address was not confirmed. Check the record it creates in the dashboard, or call GET /zones/<ZONE_ID>/email/auth/dmarc-reports.

Add the Record Manually #

DNS > Records > Add record, type TXT, name _dmarc, content as above. See Cloudflare DNS Records for the API.

Check #

COMMANDDESCRIPTION
dig TXT _dmarc.example.com +shortShow the policy
dig TXT example.com._report._dmarc.<DEST_DOMAIN> +shortCheck external report authorisation

See Also #

Search all sheets

Tip: / or Ctrl/Cmd+K to open, Esc to close.