DMARC: protect your domain from spoofing
DMARC builds on SPF and DKIM. It says three things. Mail from your domain should pass SPF or DKIM in a way that matches the visible From address. Here is what receivers should do when it does not. And send me reports about it.
Why it matters
Anyone can type [email protected] into the From line of a forged message. DMARC lets you tell Gmail, Outlook, and others to quarantine or reject those forgeries. It also gives you reports showing who is sending mail as your domain.
How it decides
A message passes DMARC if either of these is true.
- SPF passes, and the domain in the envelope sender matches the From domain.
- DKIM passes, and the signing domain (
d=) matches the From domain.
This match is called alignment.
A record
A TXT record named _dmarc.
_dmarc.example.ca. 3600 IN TXT "v=DMARC1; p=quarantine; sp=quarantine; rua=mailto:[email protected]; adkim=r; aspf=r; fo=1; pct=100"
The tags
| Tag | Meaning | Values |
|---|---|---|
v |
Version. Must come first. | DMARC1 |
p |
Policy for your domain | none, quarantine, reject |
sp |
Policy for subdomains. Defaults to p. |
same |
rua |
Where to send daily summary (aggregate) reports | mailto:[email protected] |
ruf |
Where to send failure (forensic) reports. Few providers send them. | mailto:... |
adkim |
DKIM alignment strictness | r relaxed (default), s strict |
aspf |
SPF alignment strictness | r relaxed (default), s strict |
pct |
Percentage of failing mail the policy applies to | 0 to 100. Default 100. The updated DMARC standard drops it, so some receivers ignore it. |
fo |
When to create failure reports | 0 (both fail), 1 (either fails), d, s |
ri |
Report interval in seconds | 86400 default |
Relaxed alignment lets mail.example.ca align with example.ca. Strict requires an exact match.
The three policies
| Policy | What receivers do with failing mail |
|---|---|
p=none |
Deliver normally. Send reports only. This is monitoring. |
p=quarantine |
Send to spam or junk |
p=reject |
Refuse the message |
Staged rollout
Do not start with reject. A real sender you forgot, such as an invoicing system, would be blocked.
Stage 1: Monitor (2 to 4 weeks)
_dmarc.example.ca. 3600 IN TXT "v=DMARC1; p=none; rua=mailto:[email protected]"
Collect reports. Find every service that sends as @example.ca. Fix their SPF or DKIM.
Stage 2: Quarantine a sample (2 weeks)
_dmarc.example.ca. 3600 IN TXT "v=DMARC1; p=quarantine; pct=10; rua=mailto:[email protected]"
Only 10% of failures are affected. Watch for complaints of missing mail.
Stage 3: Quarantine fully (2 to 4 weeks)
_dmarc.example.ca. 3600 IN TXT "v=DMARC1; p=quarantine; pct=100; rua=mailto:[email protected]"
Raise to 25, 50, and 100 if all is quiet.
Stage 4: Reject
_dmarc.example.ca. 3600 IN TXT "v=DMARC1; p=reject; rua=mailto:[email protected]"
Forged mail is now refused. Keep reading reports.
Many small businesses stay at quarantine, which is safe and effective. Move to reject only when reports show every real sender passes.
Reports
Aggregate reports arrive as zipped XML files, once a day from each large receiver. They are hard to read by eye. Free DMARC report viewers turn them into tables. Use a dedicated mailbox such as [email protected] so reports do not fill your inbox.
Check it
dig +short TXT _dmarc.example.ca
"v=DMARC1; p=none; rua=mailto:[email protected]"
Mistakes to avoid
| Mistake | Result |
|---|---|
| Two DMARC records | DMARC ignored |
Typing p=reject first |
Real mail blocked |
Missing v=DMARC1 first |
Record ignored |
rua address on another domain without permission |
Reports not delivered |
| Forgetting website forms, invoicing, and newsletter services | Their mail fails |
Still stuck? Ask us and we'll walk you through it.