Domain-based Message Authentication, Reporting and Conformance (DMARC)
DMARC ties SPF and
DKIM to the From: header the
recipient actually sees, tells receiving servers what to do when neither
authenticates, and sends the domain owner reports about who is sending mail as
their domain.
It is defined in RFC 7489. Without it, SPF and DKIM authenticate identifiers a recipient never looks at, and a message can pass both while displaying any sender address at all.
What does a DMARC record look like?
A TXT record at the _dmarc subdomain:
$ dig +short TXT _dmarc.example.com
"v=DMARC1; p=reject; rua=mailto:dmarc@example.com; adkim=s; aspf=s"
| Tag | Meaning |
|---|---|
p= |
policy: none, quarantine or reject |
sp= |
a different policy for subdomains |
rua= |
where to send aggregate reports |
ruf= |
where to send forensic reports, rarely supported |
pct= |
apply the policy to only this percentage of mail |
adkim= / aspf= |
alignment mode, r relaxed (default) or s strict |
What is alignment, and why does it matter?
Alignment is the entire point of DMARC. A message passes DMARC when at least one of the following holds:
- SPF passes and the envelope sender domain aligns with the
From:domain, or - DKIM passes and the signature’s
d=aligns with theFrom:domain.
Without alignment, an attacker registers attacker.example, publishes a valid
SPF record and signs with a valid DKIM key for it, then sends mail with
From: billing@yourbank.example. Both checks pass — for the wrong domain.
Alignment is what makes that fail.
Relaxed alignment (r) accepts an organisational-domain match, so
mail.example.com aligns with example.com. Strict (s) requires an exact
match, which is more rigorous and more likely to break a third-party sender.
What do the policies do?
p=none— do nothing differently, but send me reports. This is a monitoring mode, not protection.p=quarantine— treat failing mail as suspicious, in practice the spam folder.p=reject— refuse failing mail at the SMTP level.
Only p=reject actually stops someone spoofing your domain. A record with
p=none that has sat unchanged for three years is a very common state and
provides no defence against the
attack vector it was published to address.
How do you roll DMARC out safely?
The order matters, because going straight to p=reject will block your own
mail from services you have forgotten about:
- Publish
p=nonewith arua=address. Change nothing else. - Read the aggregate reports for a few weeks. They will list every source sending as your domain — including the CRM, the invoicing system and the monitoring host nobody documented.
- Fix each legitimate source so it either passes aligned SPF or is signed with an aligned DKIM key. Sources you do not recognise are the ones DMARC exists to stop.
- Move to
p=quarantine, optionally withpct=to ramp gradually. - Move to
p=rejectonce the reports show no legitimate failures.
Steps 2 and 3 are the work. Steps 1, 4 and 5 are DNS edits.
What are aggregate reports?
Receiving providers send a daily XML summary to the rua= address, grouped by
source IP:
<record>
<row>
<source_ip>192.0.2.25</source_ip>
<count>184</count>
<policy_evaluated>
<disposition>none</disposition>
<dkim>pass</dkim>
<spf>fail</spf>
</policy_evaluated>
</row>
<identifiers>
<header_from>example.com</header_from>
</identifiers>
</record>
These are the most useful inventory of your own sending infrastructure you will ever get, and they arrive whether or not you asked for the inventory. Reading them raw is unpleasant at volume, so most operators feed them into a parser.
What DMARC does not solve
- Lookalike domains.
exarnple.comis not your domain, so your policy has no bearing on it. DMARC protects the exact domain and its subdomains, nothing more. - Display name spoofing.
From: "Your Bank" <random@gmail.com>passes DMARC forgmail.comand displays a trusted name in most clients. - Compromised accounts. Mail sent through your own infrastructure with stolen credentials authenticates perfectly. See access management.
- Mailing lists. Lists that modify messages break DKIM and do not align SPF,
so a
p=rejectpolicy causes list mail from your domain to be rejected. Most lists work around this by rewriting theFrom:header.
Related reading
Howto block Google Groups spam in Rspamd is worth reading alongside this page. The spam described there passes DMARC, because it is sent by the infrastructure the domain authorised. DMARC answers “is this domain really the sender”, never “is this message wanted”.