DMARC (Domain-based Message Authentication, Reporting & Conformance) is the capstone of modern email authentication, binding SPF and DKIM results to the visible From: domain. This guide dissects RFC 7489 in full — from identifier alignment modes to aggregate report XML schemas — and walks you through a phased deployment from p=none to p=reject. With 3.4 billion phishing emails sent daily (Valimail 2024), DMARC is no longer optional; it is the single most effective control against domain impersonation.
- Why DMARC Exists
- The SPF + DKIM + DMARC Stack
- Identifier Alignment
- DMARC Record Anatomy
- Policy Comparison: none / quarantine / reject
- Deployment Phases — Zero to Reject
- Aggregate Report XML Structure
- Subdomain Policy & Organizational Domain Fallback
- Best Practices
- Common Mistakes
- Tools
- Sources & References
1. Why DMARC Exists
SMTP was designed in 1982 (RFC 821) with zero sender verification. Any server can claim to send mail from any domain — the protocol simply trusts the declared identity. This architectural flaw makes email the #1 vector for phishing, BEC (Business Email Compromise), and brand impersonation.
💡 The FBI's Internet Crime Complaint Center (IC3) reported $2.9 billion in BEC losses in 2023 alone — more than any other cybercrime category. DMARC directly mitigates this by preventing unauthorized use of your domain in the From: header.
SPF (RFC 7208, 2014) and DKIM (RFC 6376, 2011) were created to address this gap, but each has blind spots: SPF validates the envelope sender, not the visible From: header; DKIM validates a signature but doesn't tell recipients what to do if it fails. DMARC (RFC 7489, 2015) bridges both by introducing policy and reporting on top of SPF and DKIM.
📖 Definition — DMARC is an email authentication protocol published as RFC 7489 that allows domain owners to declare a policy (none, quarantine, or reject) for messages that fail SPF and/or DKIM alignment with the From: header domain, and to receive aggregate and forensic reports about authentication results.
2. The SPF + DKIM + DMARC Stack
DMARC does not replace SPF or DKIM — it orchestrates them. A message passes DMARC if at least one of SPF or DKIM both passes and aligns with the From: domain.
| Layer | RFC | What It Validates | Where It Checks |
|---|---|---|---|
| SPF | RFC 7208 | Authorized sending IPs | MAIL FROM (envelope sender) |
| DKIM | RFC 6376 | Message integrity & origin | DKIM-Signature header (d= tag) |
| DMARC | RFC 7489 | Policy + alignment of SPF/DKIM to From: |
_dmarc.domain.com TXT record |
# Simplified DMARC evaluation logic
DMARC_PASS = (SPF_PASS && SPF_ALIGNED) || (DKIM_PASS && DKIM_ALIGNED)
# If DMARC fails → apply policy (none | quarantine | reject)
⚠️ A message can pass SPF and DKIM individually but still fail DMARC if neither result aligns with the From: header domain. Alignment is the critical gate.
3. Identifier Alignment
Alignment is DMARC's core innovation. It ensures the domain authenticated by SPF or DKIM matches (or is a sub-domain of) the domain the recipient sees in the From: header.
| Mode | Tag | Matching Rule | Example |
|---|---|---|---|
| Relaxed (default) | aspf=r / adkim=r |
Organizational domain must match | mail.example.com aligns with example.com |
| Strict | aspf=s / adkim=s |
Exact domain must match | mail.example.com does NOT align with example.com |
Start with relaxed alignment (aspf=r; adkim=r) during initial deployment. Switch to strict only after you've confirmed every legitimate sending service signs with your exact From: domain — strict mode breaks subdomain senders.
SPF Alignment
The domain in the MAIL FROM (Return-Path) is compared against the From: header domain. Many ESPs use their own return-path (e.g., bounces.sendgrid.net), which breaks SPF alignment. You must configure a custom return-path like em1234.yourdomain.com.
DKIM Alignment
The d= tag in the DKIM-Signature header is compared against the From: header domain. Most providers allow you to set a custom DKIM signing domain — this is the preferred alignment path because it survives forwarding.
🎯 Prioritize DKIM alignment over SPF alignment. DKIM signatures survive forwarding (unlike SPF), making DKIM the more reliable alignment path for DMARC.
4. DMARC Record Anatomy
A DMARC record is a DNS TXT record published at _dmarc.yourdomain.com. Every tag is explained below:
v=DMARC1; p=reject; sp=quarantine; rua=mailto:dmarc-agg@example.com;
ruf=mailto:dmarc-forensic@example.com; adkim=r; aspf=r; pct=100; ri=86400; fo=1
| Tag | Required | Meaning | Values |
|---|---|---|---|
v | Yes | Protocol version | DMARC1 (must be first) |
p | Yes | Domain policy | none | quarantine | reject |
sp | No | Subdomain policy | none | quarantine | reject (inherits p if omitted) |
rua | No | Aggregate report URI(s) | mailto: address(es), comma-separated |
ruf | No | Forensic (failure) report URI(s) | mailto: address(es) |
adkim | No | DKIM alignment mode | r (relaxed, default) | s (strict) |
aspf | No | SPF alignment mode | r (relaxed, default) | s (strict) |
pct | No | Percentage of messages to apply policy | 0–100 (default 100) |
ri | No | Aggregate report interval (seconds) | Default 86400 (24 h) |
fo | No | Forensic report options | 0 (default, all fail) | 1 (any fail) | d (DKIM fail) | s (SPF fail) |
🚫 The v=DMARC1 tag must be the first tag in the record. If it is not, receivers will ignore the entire record and DMARC evaluation will not occur (RFC 7489 §6.3).
5. Policy Comparison: none / quarantine / reject
| Policy | Receiver Action | Use Case | Risk Level |
|---|---|---|---|
| none | Deliver normally; send reports only | Monitoring phase — discover all legitimate senders | Low |
| quarantine | Route to spam/junk folder | Intermediate enforcement — catch misconfigurations before reject | Medium |
| reject | Reject at SMTP level (5xx) | Full enforcement — spoofed mail is blocked entirely | High |
⚠️ Jumping straight to p=reject without monitoring will block legitimate email from misconfigured services (marketing platforms, CRMs, ticketing systems). Always start with p=none.
6. Deployment Phases — Zero to Reject
Audit & Inventory
List every service that sends email as your domain: transactional, marketing, support, SaaS platforms. Check From:, Return-Path, and DKIM signing domains.
Publish p=none
Deploy v=DMARC1; p=none; rua=mailto:dmarc@example.com; fo=1. This collects reports without affecting delivery. Monitor for 2–4 weeks minimum.
Analyze Reports
Parse aggregate XML reports (or use a tool). Identify unauthorized senders and fix alignment for legitimate ones — configure custom return-paths and DKIM signing domains.
Ramp to quarantine
Move to p=quarantine; pct=25, then increase pct to 50, 75, 100 over several weeks. Monitor bounces and support tickets.
Enforce reject
Switch to p=reject; pct=100. Continue monitoring reports for new senders. Consider sp=reject for subdomains.
Maintain & Monitor
DMARC is not set-and-forget. New vendors, infrastructure changes, and acquisitions all require ongoing report analysis and record updates.
7. Aggregate Report XML Structure
Receivers (Google, Microsoft, Yahoo, etc.) send daily aggregate reports as gzipped XML to your rua address. The schema is defined in RFC 7489 Appendix C.
<feedback>
<report_metadata>
<org_name>google.com</org_name>
<email>noreply-dmarc-support@google.com</email>
<report_id>17283946572</report_id>
<date_range>
<begin>1712880000</begin>
<end>1712966400</end>
</date_range>
</report_metadata>
<policy_published>
<domain>example.com</domain>
<adkim>r</adkim>
<aspf>r</aspf>
<p>reject</p>
<sp>quarantine</sp>
<pct>100</pct>
</policy_published>
<record>
<row>
<source_ip>203.0.113.45</source_ip>
<count>1482</count>
<policy_evaluated>
<disposition>none</disposition>
<dkim>pass</dkim>
<spf>fail</spf>
</policy_evaluated>
</row>
</record>
</feedback>
🎯 Don't try to read raw XML by hand. Use a DMARC report analyzer to parse, aggregate, and visualize authentication results across all your sending sources.
8. Subdomain Policy & Organizational Domain Fallback
RFC 7489 §6.6.3 defines the organizational domain fallback mechanism. When a receiver processes a message from sub.example.com, it first looks for _dmarc.sub.example.com. If no record exists, it falls back to _dmarc.example.com and applies the sp= tag (or p= if sp= is absent).
💡 If you set p=reject without sp=, subdomains inherit reject. This catches attackers who spoof random subdomains like secure-login.example.com. However, it can also block legitimate subdomain senders you forgot to configure.
| Record Location | Tags | Effect on sub.example.com |
|---|---|---|
_dmarc.example.com |
p=reject; sp=none |
Subdomains are monitored only |
_dmarc.example.com |
p=reject (no sp) |
Subdomains inherit reject |
_dmarc.sub.example.com |
p=none |
Subdomain has its own policy — overrides parent |
9. Best Practices
Always start with p=none
Monitor for at least 2–4 weeks before enforcing. Rushing to reject causes legitimate mail loss.
Use fo=1
Generates forensic reports when any mechanism fails (not just both). Critical for debugging alignment issues.
Prioritize DKIM alignment
DKIM survives forwarding; SPF does not. Ensure every sender signs with your domain in the d= tag.
Use a dedicated rua address
Aggregate reports are high-volume XML. Use a dedicated mailbox or a third-party processing service.
Protect subdomains
Attackers love random-sub.yourdomain.com. Set sp=reject or publish per-subdomain records.
Review quarterly
New vendors, acquisitions, and infrastructure changes can break alignment. Schedule quarterly DMARC audits.
10. Common Mistakes
🚫 Publishing multiple DMARC records. DNS allows multiple TXT records at the same name, but RFC 7489 §6.6.3 states that if more than one v=DMARC1 record is found, the result is undefined and receivers may ignore both.
🚫 Skipping the monitoring phase. Deploying p=reject on day one blocks mail from forgotten senders — invoicing systems, CRMs, newsletter platforms — causing business disruption.
⚠️ Ignoring mailing lists. Mailing lists (LISTSERV, Google Groups) rewrite the From: header or envelope sender, breaking both SPF and DKIM alignment. Use ARC (RFC 8617) awareness or whitelist known lists.
⚠️ Sending rua reports to an external domain without authorization. If your rua address is in a different domain, that domain must publish a _dmarc-report._dmarc.receiver.com record authorizing report delivery (RFC 7489 §7.1).
⚠️ Not configuring DKIM for third-party senders. SPF alone is fragile. If you rely solely on SPF alignment, forwarded mail will fail DMARC. Always configure DKIM as a second authentication path.
11. Tools
Use these tools to validate and generate your DMARC configuration:
| Tool | Purpose |
|---|---|
| DMARC Record Checker | Look up and validate any domain's DMARC record |
| DMARC Record Generator | Build a correct DMARC record with guided tag selection |
| DMARC Report Analyzer | Upload and visualize aggregate XML reports |
| SPF Record Checker | Validate SPF syntax and count DNS lookups |
| DKIM Record Checker | Look up and validate DKIM public key records |
12. Sources & References
- 📄 RFC 7489 — Domain-based Message Authentication, Reporting, and Conformance (DMARC)
- 📄 RFC 7208 — Sender Policy Framework (SPF)
- 📄 RFC 6376 — DomainKeys Identified Mail (DKIM) Signatures
- 📄 RFC 8617 — Authenticated Received Chain (ARC)
- 📄 M3AAWG — Best Practices for Implementing DMARC
- 📄 Valimail — Email Fraud Landscape Report 2024
- 📄 FBI IC3 — Internet Crime Report 2023
- 📄 Google Workspace — Set up DMARC
- 📄 Microsoft 365 — Configure DMARC
DMARC is the policy layer that makes SPF and DKIM actionable. Without it, authentication results are advisory — receivers can ignore failures. Deploy DMARC in phases (none → quarantine → reject), prioritize DKIM alignment over SPF, monitor aggregate reports continuously, and protect your subdomains. A p=reject DMARC record is the single strongest defense against domain impersonation and phishing.

