Loading content...
SPF validates sending IP addresses. DKIM validates message signatures. But a critical question remains unanswered: What should receivers do when these checks fail?
Before DMARC, every receiving mail server made its own decision. Some rejected SPF failures; others ignored them. Some quarantined DKIM failures; others delivered them anyway. Domain owners had no visibility into whether their domain was being spoofed and no control over how receivers handled spoofed messages.
DMARC (Domain-based Message Authentication, Reporting, and Conformance) solves both problems:
Published as RFC 7489 (2015), DMARC is now a requirement for bulk senders to major mailbox providers. Gmail, Yahoo, and Microsoft require DMARC for domains sending over 5,000 emails daily. Understanding DMARC is no longer optional for any organization sending email at scale.
By the end of this page, you will understand DMARC's alignment model, policy options, reporting mechanisms, and deployment strategies. You'll be able to construct DMARC records for any domain, interpret aggregate and forensic reports, and troubleshoot alignment failures.
SPF and DKIM authenticate different identifiers, neither of which is the visible From header that end users see and trust.
SPF authenticates: The envelope sender (MAIL FROM / Return-Path)
DKIM authenticates: The signing domain (d= tag in DKIM-Signature)
Users see and trust: The From header (From: "CEO" <ceo@company.com>)
123456789101112131415161718192021
# Attacker sends phishing email that PASSES both SPF and DKIM# but spoofs the visible From header Return-Path: <bounce@attacker-domain.com> ← SPF checks thisReceived: from mail.attacker-domain.com [198.51.100.50]DKIM-Signature: v=1; d=attacker-domain.com; s=sel1; ... ← DKIM checks d=From: "CEO John Smith" <ceo@legitimate-bank.com> ← USER SEES THISTo: victim@target.comSubject: Urgent: Wire Transfer Required Click here to authorize payment... # SPF result: PASS (198.51.100.50 authorized for attacker-domain.com)# DKIM result: PASS (valid signature for attacker-domain.com)# User sees: "From: ceo@legitimate-bank.com"# Attack: SUCCESSFUL without DMARC! # Why this works:# - SPF validates envelope (attacker-domain.com) ✓# - DKIM validates signature (attacker-domain.com) ✓# - Neither validates the visible From header!DMARC requires that SPF and/or DKIM authenticate an identifier that aligns with the visible From domain.
SPF Alignment: The domain in the envelope sender (MAIL FROM) must align with the From header domain.
DKIM Alignment: The signing domain (d= tag) must align with the From header domain.
At least one must pass AND align for DMARC to pass.
DMARC supports two alignment modes:
Strict (s): Exact domain match required. mail.example.com does NOT align with example.com.
Relaxed (r): Organizational domain match. mail.example.com DOES align with example.com (shares the same organizational domain).
Default is relaxed, which is more forgiving for subdomains.
DMARC evaluation occurs after SPF and DKIM checks have completed. It ties their results together through alignment and applies the domain owner's policy.
Extract From domain: Parse the RFC 5322 From header to get the domain (e.g., example.com)
Query DMARC record: Look up _dmarc.example.com TXT record
Check SPF alignment:
Check DKIM alignment:
d= domain align with the From domain?Determine DMARC result:
Apply policy: Based on the p= tag, take action (none, quarantine, reject)
Generate reports: Collect data for aggregate/forensic reports
123456789101112131415161718192021222324252627282930313233343536
# Example 1: SPF Alignment PASS (relaxed mode) From: user@mail.example.comMAIL FROM: bounce@marketing.example.comSPF: PASS for marketing.example.com Alignment check (relaxed):- From domain: example.com (organizational)- MAIL FROM domain: example.com (organizational)- Same organizational domain → SPF ALIGNED ✓ # Example 2: DKIM Alignment PASS (relaxed mode) From: user@example.comDKIM-Signature: d=news.example.com; ...DKIM: PASS Alignment check (relaxed):- From domain: example.com (organizational)- DKIM d= domain: example.com (organizational)- Same organizational domain → DKIM ALIGNED ✓ # Example 3: Both Fail Alignment (strict mode) DMARC policy: p=reject; aspf=s; adkim=s From: user@example.comMAIL FROM: bounce@mail.example.comDKIM-Signature: d=mail.example.com; ... Alignment check (strict):- From domain: example.com- MAIL FROM domain: mail.example.com (different!)- DKIM d= domain: mail.example.com (different!)- Neither aligns strictly → DMARC FAIL- Policy: reject → Message blockedDMARC records are published as DNS TXT records at the _dmarc subdomain. Understanding each tag enables precise policy configuration.
_dmarc.example.com. IN TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com; ..."
| Tag | Required | Description | Values/Example |
|---|---|---|---|
v= | Yes | Protocol version | v=DMARC1 (always) |
p= | Yes | Policy for domain | none, quarantine, reject |
sp= | No | Policy for subdomains | none, quarantine, reject (defaults to p=) |
pct= | No | Percent of messages to apply policy | pct=50 (gradual rollout) |
rua= | No | Aggregate report URI(s) | rua=mailto:dmarc@example.com |
ruf= | No | Forensic report URI(s) | ruf=mailto:forensic@example.com |
adkim= | No | DKIM alignment mode | r (relaxed, default), s (strict) |
aspf= | No | SPF alignment mode | r (relaxed, default), s (strict) |
fo= | No | Forensic reporting options | 0 (default), 1, d, s |
ri= | No | Reporting interval (seconds) | ri=86400 (daily, default) |
p=none (Monitor Only)
p=quarantine (Flag Suspicious)
p=reject (Block Completely)
1234567891011121314151617181920212223242526
# Example 1: Monitoring mode (initial deployment)_dmarc.example.com. TXT "v=DMARC1; p=none; rua=mailto:dmarc-agg@example.com"# - No enforcement, just collect reports# - Analyze reports to identify all legitimate senders # Example 2: Gradual enforcement (5% quarantine)_dmarc.example.com. TXT "v=DMARC1; p=quarantine; pct=5; rua=mailto:dmarc@example.com"# - 5% of failing messages quarantined# - 95% still delivered (with DMARC failure noted)# - Monitor for false positives before increasing # Example 3: Full enforcement with reporting_dmarc.example.com. TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com; ruf=mailto:forensic@example.com"# - 100% DMARC failures rejected# - Aggregate reports for statistics# - Forensic reports for detailed failure analysis # Example 4: Strict alignment with subdomain policy_dmarc.example.com. TXT "v=DMARC1; p=reject; sp=quarantine; aspf=s; adkim=s; rua=mailto:dmarc@example.com"# - Main domain: strict reject# - Subdomains: quarantine only (more lenient)# - Strict alignment for both SPF and DKIM # Example 5: Multiple report destinations_dmarc.example.com. TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com,mailto:reports@thirdparty.com"# - Reports sent to both internal and third-party analyzerDMARC's reporting mechanism is arguably as valuable as its policy enforcement. Reports provide visibility into how your domain is being used (and abused) across the internet.
Aggregate reports are XML files sent daily (by default) containing statistics about DMARC evaluation for your domain.
Contents:
Use cases:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
<?xml version="1.0" encoding="UTF-8" ?><feedback> <report_metadata> <org_name>google.com</org_name> <email>noreply-dmarc-support@google.com</email> <report_id>12345678901234567890</report_id> <date_range> <begin>1705363200</begin> <end>1705449600</end> </date_range> </report_metadata> <policy_published> <domain>example.com</domain> <adkim>r</adkim> <aspf>r</aspf> <p>reject</p> <sp>reject</sp> <pct>100</pct> </policy_published> <record> <row> <source_ip>203.0.113.50</source_ip> <count>2547</count> <policy_evaluated> <disposition>none</disposition> <dkim>pass</dkim> <spf>pass</spf> </policy_evaluated> </row> <identifiers> <header_from>example.com</header_from> </identifiers> <auth_results> <dkim> <domain>example.com</domain> <result>pass</result> <selector>sel1</selector> </dkim> <spf> <domain>example.com</domain> <result>pass</result> </spf> </auth_results> </record> <!-- Suspicious record: spoofing attempt --> <record> <row> <source_ip>198.51.100.99</source_ip> <count>347</count> <policy_evaluated> <disposition>reject</disposition> <dkim>fail</dkim> <spf>fail</spf> </policy_evaluated> </row> <identifiers> <header_from>example.com</header_from> </identifiers> <auth_results> <spf> <domain>malicious.com</domain> <result>pass</result> </spf> </auth_results> </record></feedback>Forensic reports contain detailed information about individual message failures.
Contents:
Privacy considerations:
Forensic reporting options (fo= tag):
fo=0: Generate report if all mechanisms fail (default)fo=1: Generate report if any mechanism failsfo=d: Generate report if DKIM failsfo=s: Generate report if SPF failsRaw DMARC reports are XML and can be overwhelming in volume. Use dedicated services (DMARC Analyzer, Dmarcian, Valimail, PowerDMARC) or open-source tools (parsedmarc, DMARC Report Analyzer) to aggregate, visualize, and alert on report data. These tools transform raw XML into actionable dashboards.
By default, DMARC reports can only be sent to addresses within the domain being authenticated. Sending reports to external addresses requires explicit authorization to prevent abuse.
If anyone could specify rua=mailto:victim@example.com in a DMARC record, attackers could flood arbitrary mailboxes with reports. DMARC defines a verification mechanism for external destinations.
To receive DMARC reports for example.com at reports@thirdparty.com:
Domain owner publishes: rua=mailto:reports@thirdparty.com
Third party must authorize by publishing:
example.com._report._dmarc.thirdparty.com. TXT "v=DMARC1"
Report generator checks: Before sending to external address, looks up the authorization record
If authorized: Reports sent to third party
If not authorized: Reports not sent, or sent only to internal addresses
123456789101112131415161718192021
# Scenario: example.com wants reports sent to dmarcservice.net # Step 1: example.com publishes DMARC with external RUA_dmarc.example.com. TXT "v=DMARC1; p=reject; rua=mailto:reports@dmarcservice.net" # Step 2: dmarcservice.net authorizes receiving reports for example.comexample.com._report._dmarc.dmarcservice.net. TXT "v=DMARC1" # Step 3: Report generator (e.g., Google) # - Processes mail for example.com# - Sees rua points to dmarcservice.net (external)# - Queries: example.com._report._dmarc.dmarcservice.net# - Finds authorization record# - Sends aggregate reports to reports@dmarcservice.net # Multiple domains can authorize the same external destinationcustomer1.com._report._dmarc.dmarcservice.net. TXT "v=DMARC1"customer2.com._report._dmarc.dmarcservice.net. TXT "v=DMARC1"customer3.com._report._dmarc.dmarcservice.net. TXT "v=DMARC1" # The third-party service receives reports for all customersLarge domains can receive hundreds of megabytes of report data daily. The rua mailbox should be a dedicated address with appropriate storage and automated processing, not a human's inbox. Consider using a subdomain specifically for DMARC (e.g., dmarc-reports@example.com).
DMARC deployment should be methodical and phased to avoid blocking legitimate email. Rushing to p=reject without proper preparation causes outages.
p=none and reporting. Collect 2-4 weeks of data. Analyze reports to find missed sources or configuration issues.pct=5 to affect only 5% of failing messages. Monitor for user complaints. Gradually increase pct while monitoring.| Week | Policy | pct | Actions |
|---|---|---|---|
| 1-4 | p=none | Deploy, collect reports, analyze senders | |
| 5-6 | p=quarantine | 5 | Begin quarantine, monitor complaints |
| 7-8 | p=quarantine | 25 | Expand quarantine coverage |
| 9-10 | p=quarantine | 50 | Half of failures quarantined |
| 11-12 | p=quarantine | 100 | Full quarantine enforcement |
| 13 | p=reject | 5 | Begin reject with caution |
| 14 | p=reject | 25 | Expand reject coverage |
| 15 | p=reject | 50 | Half of failures rejected |
| 16+ | p=reject | 100 | Full enforcement achieved |
1234567891011121314151617181920
# Week 1: Start monitoring_dmarc.example.com. TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com" # Week 5: Begin quarantine (5%)_dmarc.example.com. TXT "v=DMARC1; p=quarantine; pct=5; rua=mailto:dmarc@example.com" # Week 8: Increase quarantine_dmarc.example.com. TXT "v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc@example.com" # Week 12: Full quarantine_dmarc.example.com. TXT "v=DMARC1; p=quarantine; pct=100; rua=mailto:dmarc@example.com" # Week 13: Begin reject (5%)_dmarc.example.com. TXT "v=DMARC1; p=reject; pct=5; rua=mailto:dmarc@example.com" # Week 16+: Full enforcement_dmarc.example.com. TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com" # Final state (production)_dmarc.example.com. TXT "v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s; rua=mailto:dmarc@example.com"Several scenarios commonly complicate DMARC deployment. Understanding these challenges helps avoid pitfalls.
When email is forwarded (e.g., university.edu → gmail.com), SPF fails because the forwarding server's IP isn't authorized by the original domain. DKIM usually survives if the forwarder doesn't modify the message.
Solution:
Marketing platforms, CRM systems, and other third parties send email "as" your domain but from their infrastructure.
Solution:
d=yourdomain.com)Authenticated Received Chain (ARC) is a newer standard (RFC 8617) that preserves authentication results through forwarding chains.
When a forwarder receives a message that passes authentication:
ARC is now widely supported by major mailbox providers and helps legitimate forwarded mail pass DMARC despite SPF failures.
Consider using dedicated subdomains for different email purposes:
• mail.example.com — Corporate mail (full DMARC enforcement)
• marketing.example.com — Marketing platforms (separate SPF/DKIM)
• transactional.example.com — Automated system emails
• support.example.com — Help desk system
This isolates authentication configurations and limits blast radius if one system is compromised.
DMARC completes the email authentication triad by adding policy enforcement and alignment requirements to SPF and DKIM. Let's consolidate the key concepts:
| Protocol | What It Validates | Published In | Survives Forwarding |
|---|---|---|---|
| SPF | Sending IP is authorized for envelope domain | example.com TXT | No |
| DKIM | Message signed by domain, content unmodified | selector._domainkey.example.com TXT | Usually yes |
| DMARC | SPF/DKIM align with visible From; policy enforcement | _dmarc.example.com TXT | Via DKIM & ARC |
What's Next:
SPF, DKIM, and DMARC authenticate email senders. But they don't protect message content from being read by adversaries. The final page covers Email Encryption, including:
These technologies ensure email content confidentiality in addition to sender authentication.
You now understand DMARC's alignment model, policy options, reporting mechanisms, and deployment strategies. You can construct DMARC records for any domain, interpret aggregate reports, troubleshoot alignment failures, and guide organizations through DMARC deployment from monitoring to full enforcement.