DMARC (Domain-based Message Authentication, Reporting, and Conformance) is an email authentication protocol that builds on SPF and DKIM. It allows domain owners to specify how receiving mail servers should handle messages that fail authentication checks and provides reporting mechanisms for monitoring email authentication.
- Authentication: Checks SPF and DKIM results
- Alignment: Verifies domain alignment
- Policy Application: Applies sender's specified policy
- Reporting: Sends aggregate and forensic reports
DMARC records are published as TXT records at:
_dmarc.domain.com
v=DMARC1; p=none; rua=mailto:dmarc@example.com
v=: Version (always "DMARC1")p=: Policy for main domain (none, quarantine, reject)
rua=: Aggregate reports URIruf=: Forensic reports URIsp=: Subdomain policypct=: Percentage of messages to apply policyadkim=: DKIM alignment mode (r=relaxed, s=strict)aspf=: SPF alignment mode (r=relaxed, s=strict)fo=: Forensic report optionsrf=: Report formatri=: Report interval (seconds)
_dmarc.example.com TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
_dmarc.example.com TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com; pct=50"
_dmarc.example.com TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com; ruf=mailto:forensics@example.com"
_dmarc.example.com TXT "v=DMARC1; p=reject; sp=quarantine; pct=100; rua=mailto:dmarc@example.com; ruf=mailto:forensics@example.com; adkim=r; aspf=r; fo=1; rf=afrf; ri=86400"
none: No action, monitoring onlyquarantine: Treat as suspicious (usually spam folder)reject: Reject the message
Same options as main domain policy. If not specified, inherits from p=.
# Apply policy to 25% of failing messages
v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc@example.com
# Apply to all messages (default if omitted)
v=DMARC1; p=reject; pct=100; rua=mailto:dmarc@example.com
Note: The pct tag affects the application of p= and sp= policies but does not affect reporting. Aggregate reports (rua) will still cover 100% of messages regardless of the pct value.
r(relaxed): Subdomains can aligns(strict): Exact domain match required
# Relaxed: mail from subdomain.example.com aligns with example.com
v=DMARC1; p=reject; aspf=r
# Strict: only mail from example.com aligns with example.com
v=DMARC1; p=reject; aspf=s
r(relaxed): Subdomains can aligns(strict): Exact domain match required
# Relaxed: DKIM d=subdomain.example.com aligns with From: example.com
v=DMARC1; p=reject; adkim=r
# Strict: DKIM d= must exactly match From: domain
v=DMARC1; p=reject; adkim=s
Daily summaries of authentication results:
# Single recipient
v=DMARC1; p=none; rua=mailto:dmarc@example.com
# Multiple recipients
v=DMARC1; p=none; rua=mailto:dmarc@example.com,mailto:reports@monitoring.com
# With size limit (10MB)
v=DMARC1; p=none; rua=mailto:dmarc@example.com!10m
Detailed reports for individual failures:
# Basic forensic reporting
v=DMARC1; p=none; ruf=mailto:forensics@example.com
# Multiple recipients
v=DMARC1; p=none; ruf=mailto:forensics@example.com,mailto:security@example.com
Controls when forensic reports are sent:
0: Report if all underlying authentication mechanisms (SPF and DKIM) fail to produce an aligned "pass" result (default).1: Report if any underlying authentication mechanism (SPF or DKIM) produced something other than an aligned "pass" result.d: Report if the DKIM signature failed validation, regardless of its alignment.s: Report if the SPF evaluation failed, regardless of its alignment.
Note: The fo tag is only effective when a ruf URI is also specified in the DMARC record.
# Report any authentication failure
v=DMARC1; p=none; ruf=mailto:forensics@example.com; fo=1
# Phase 1: Monitor only (1-4 weeks)
_dmarc.example.com TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
# Phase 2: Quarantine subset (2-4 weeks)
_dmarc.example.com TXT "v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc@example.com"
# Phase 3: Quarantine all (2-4 weeks)
_dmarc.example.com TXT "v=DMARC1; p=quarantine; pct=100; rua=mailto:dmarc@example.com"
# Phase 4: Reject subset (2-4 weeks)
_dmarc.example.com TXT "v=DMARC1; p=reject; pct=25; rua=mailto:dmarc@example.com"
# Phase 5: Full enforcement
_dmarc.example.com TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com"
# Use dedicated addresses for different report types
v=DMARC1; p=reject;
rua=mailto:dmarc-aggregate@example.com;
ruf=mailto:dmarc-forensic@example.com
# Send reports to third-party processor
v=DMARC1; p=reject;
rua=mailto:12345@dmarc.service.com,mailto:dmarc@example.com
# Different policy for subdomains
v=DMARC1; p=reject; sp=quarantine; rua=mailto:dmarc@example.com
# Inherit main domain policy (default)
v=DMARC1; p=reject; rua=mailto:dmarc@example.com
Always start with p=none and analyze reports before moving to enforcement policies.
# WRONG: Two DMARC records
_dmarc.example.com TXT "v=DMARC1; p=none"
_dmarc.example.com TXT "v=DMARC1; p=reject"
# CORRECT: Single record
_dmarc.example.com TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com"
# WRONG: Missing mailto:
v=DMARC1; p=none; rua=dmarc@example.com
# WRONG: Invalid syntax
v=DMARC1; p=none; rua=<dmarc@example.com>
# CORRECT: Proper mailto: URI
v=DMARC1; p=none; rua=mailto:dmarc@example.com
# Main domain DMARC
_dmarc.example.com TXT "v=DMARC1; p=reject; sp=none"
# Subdomain can override with its own policy
_dmarc.subdomain.example.com TXT "v=DMARC1; p=quarantine"
When sending reports to external domains:
# Receiving domain must authorize
example.com._report._dmarc.reportprocessor.com TXT "v=DMARC1"
# pct only applies to the policy action, not monitoring
# This still monitors 100% but only quarantines 50%
v=DMARC1; p=quarantine; pct=50; rua=mailto:dmarc@example.com
# Standard configuration
_dmarc.example.com TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com; ruf=mailto:forensics@example.com; fo=1"
# Immediate reject policy for parked domains
_dmarc.parkeddomain.com TXT "v=DMARC1; p=reject; rua=mailto:dmarc@maindomain.com"
# Main domain sends email, subdomains don't
_dmarc.example.com TXT "v=DMARC1; p=quarantine; sp=reject; rua=mailto:dmarc@example.com"
# Separate policy for test subdomain
_dmarc.test.example.com TXT "v=DMARC1; p=none; rua=mailto:dmarc-test@example.com"
<feedback>
<report_metadata>
<org_name>Google.com</org_name>
<email>noreply-dmarc-support@google.com</email>
<date_range>
<begin>1234567890</begin>
<end>1234654289</end>
</date_range>
</report_metadata>
<policy_published>
<domain>example.com</domain>
<p>reject</p>
<sp>reject</sp>
<pct>100</pct>
</policy_published>
<record>
<row>
<source_ip>192.0.2.1</source_ip>
<count>10</count>
<policy_evaluated>
<disposition>none</disposition>
<dkim>pass</dkim>
<spf>pass</spf>
</policy_evaluated>
</row>
</record>
</feedback>- source_ip: Sending server IP
- count: Number of messages
- disposition: Action taken (none/quarantine/reject)
- dkim/spf: Authentication results
-
Check DNS propagation
dig TXT _dmarc.example.com +short
-
Verify email addresses
- Ensure mailboxes exist
- Check spam folders
- Verify no size limits
-
Confirm report authorization
- External processors may need authorization records
-
Check record syntax
- Proper tag format
- Valid policy values
- No typos
-
Verify one record exists
- No duplicate DMARC records
- Check all nameservers
-
Review alignment settings
- May be too strict
- Check SPF/DKIM configuration
-
Identify legitimate sources
- Review source IPs in reports
- Add missing sources to SPF
- Configure DKIM for all senders
-
Check forwarding
- Forwarded mail often fails
- Consider relaxed alignment
-
Monitor third-party senders
- Marketing platforms
- CRM systems
- Support ticketing systems
# Limit report size to 10MB
v=DMARC1; p=reject; rua=mailto:dmarc@example.com!10m
# Multiple limits
v=DMARC1; p=reject; rua=mailto:dmarc@example.com!10m,mailto:backup@example.com!50m
# Gradual rollout with monitoring
v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc@example.com; ruf=mailto:forensics@example.com; fo=1
Authorize external report destinations:
# On example.com (sender)
_dmarc.example.com TXT "v=DMARC1; p=reject; rua=mailto:reports@processor.com"
# On processor.com (receiver)
example.com._report._dmarc.processor.com TXT "v=DMARC1"
- SPF record configured and tested
- DKIM signing enabled and verified
- Report processing system ready
- Identified all legitimate email sources
- Created dedicated report mailboxes
- Deploy with p=none
- Collect reports for 1-4 weeks
- Identify all legitimate senders
- Fix SPF/DKIM issues
- Update to p=quarantine
- Start with pct=25
- Monitor for false positives
- Gradually increase percentage
- Update to p=reject
- Consider starting with pct=25
- Monitor business impact
- Move to pct=100
- Regular report analysis
- Update for new email sources
- Monitor authentication failures
- Maintain SPF and DKIM
DMARC provides crucial email authentication enforcement and visibility:
- Start with monitoring (p=none) to understand email flows
- Gradually move to enforcement through quarantine and reject
- Use percentage rollouts to minimize risk
- Configure comprehensive reporting for visibility
- Maintain alignment with SPF and DKIM configurations
- Regular monitoring and updates are essential
- Consider subdomain policies separately
Combined with properly configured SPF and DKIM, DMARC forms a complete email authentication framework that significantly reduces email spoofing and phishing risks.