designwithfocus

Networking & internet basics

What Is DMARC? Email Authentication That Builds on SPF and DKIM

By Design With Focus Team 7 min read
Envelope beside a short DNS text record on a card

Short answer

DMARC is a DNS text record that tells mail receivers what to do when a message fails SPF or DKIM alignment. The record is published under _dmarc for the domain, and the policy can request no action, quarantine, or rejection. Aggregate reports go to an address the domain owner publishes.

Last verified against the sources listed below.

Key takeaways

  • DMARC is a TXT record at _dmarc.example.com that starts with v=DMARC1 and a p= policy.
  • RFC 7489 defines p=none, p=quarantine, and p=reject as requests to the receiver, not a delivery guarantee.
  • Alignment compares an SPF or DKIM domain with the visible From domain. Relaxed mode is the default.
  • The overview's rollout is SPF and DKIM first, then p=none, then quarantine, then reject.
  • Without a rua tag, receivers must not send aggregate reports. The address is public.

What is DMARC? It is a Domain-based Message Authentication, Reporting, and Conformance policy that a domain publishes in DNS so receivers know what to do when a message does not align with SPF or DKIM.

SPF and DKIM were already deployed when this policy was added, and the DMARC overview explains why they were not enough on their own. A domain often sends from many systems, including outside providers, so some real messages never authenticate. A receiver then cannot tell those messages from forgeries that also fail.

The rules are in RFC 7489, dated March 2015. Looking up the record is ordinary DNS, the same lookup path described in how the internet works. The receiver reads a text record, checks alignment, and then applies the policy the domain asked for.

What DMARC adds to SPF and DKIM

DMARC does not replace SPF or DKIM. It publishes what the receiver should do when mail fails to align with them.

SPF asks whether the sending server is allowed to use a domain. DKIM checks a cryptographic signature. The overview says a mix of authenticated and unauthenticated mail leaves the receiver guessing, because a failure can be a forgotten server or a forgery. The new record adds an explicit request plus a way to send reports back to the domain.

Cloudflare’s DMARC guide describes the three checks as the way a receiver decides whether the sender is authorized to use the domain. The policy is the instruction that follows a failed check. Keeping a domain from being impersonated also sits inside website security. Mail authentication is one control, not the whole program.

How DMARC works with email

The receiver compares an authenticated domain with the domain in the visible From address, then applies the published policy if they do not line up.

RFC 7489 calls that comparison Identifier Alignment. Relaxed mode requires the same organizational domain, and strict mode requires the full domain names to match.

Both the DKIM tag adkim and the SPF tag aspf default to relaxed, written as r. Strict mode is s.

For DKIM, relaxed mode compares the organizational domain of the signature d= value with the organizational domain of the From address. The RFC’s example: a signature for example.com aligns in relaxed mode with [email protected], and it does not align in strict mode. A signature with d=com never aligns, because com is treated as a public suffix, not an organizational domain.

For SPF, relaxed mode compares the organizational domain of the authenticated Mail From domain with the From domain. A pass for cbg.bounces.example.com aligns in relaxed mode with [email protected], and it fails strict mode. A message may carry several DKIM signatures. The RFC says the result is a pass if any one of them both verifies and aligns.

Other filters still run. The overview says the alignment test sits beside SPF, DKIM, and the receiver’s own spam checks, and it does not replace those tests.

What a DMARC record is

A DMARC record is a DNS TXT record at the _dmarc name under the domain, and it must start with the version and policy tags.

RFC 7489 says the owner of example.com publishes the record at _dmarc.example.com. The v tag must be exactly DMARC1, it must be first, and any other version means the record is ignored. The p tag is required on a policy record and must be the next tag. Unknown tags are ignored.

A minimal record looks like this:

v=DMARC1; p=none; rua=mailto:[email protected]

The rua tag lists where aggregate reports go. If it is missing, receivers must not generate those reports. The ruf tag requests per-message failure reports, and the same rule applies: no ruf means no failure reports. Receivers must support mailto: addresses for both.

Tag Role Example
v Version, must be DMARC1 v=DMARC1
p Policy for the domain p=quarantine
sp Policy for subdomains sp=reject
pct Percent of mail that gets the policy pct=100
rua Aggregate report address rua=mailto:[email protected]
adkim DKIM alignment, r or s adkim=s
aspf SPF alignment, r or s aspf=r

The overview shows a chart of tags and says the samples are illustrative, not a substitute for the specification. pct is an integer from 0 through 100 and defaults to 100, so a missing tag covers the whole stream. The percentage must not be applied to the reports. Those are sent in full.

What none, quarantine, and reject mean

RFC 7489 defines three values for p, and each one is a request. The receiver does not have to honor it.

p=none means the domain owner requests no specific action on delivery. Receivers can still send reports. The overview’s rollout starts here, so you can see which mail fails before you ask anyone to block it.

p=quarantine means the owner wants failing mail treated as suspicious. The RFC says that, depending on the receiver, this can mean a spam folder, extra scrutiny, or a flag. It does not name one required folder.

p=reject means the owner wants receivers to reject mail that fails the check. Rejection should happen during the SMTP session. If pct leaves some mail outside a reject policy, the RFC says the receiver should treat that leftover mail as quarantine.

The sp tag can set a different policy for subdomains. If you leave it out, subdomains use p. The overview’s five-step list moves from none to quarantine to reject only after the reports match the mail you meant to send.

Why publishing the record matters

The record gives receivers a clear request and gives you a feed of mail that used your domain.

The overview describes the gap this fills: complex sending setups, almost no feedback unless a message bounces, and receivers that hesitate to reject failures because a legitimate stream might still be unsigned. Reports are that feedback. RFC 7489 says an owner should at least collect reports or deploy aligned authentication, and most owners will want both.

Report addresses are public, and the RFC says the reports can be large, so a dedicated mailbox is the practical choice. Cloudflare’s guide also covers domains that do not send mail: publish a policy that rejects failures, which should be every message from that name, so outsiders cannot use it. A none policy with nobody reading rua does not ask the receiver to change delivery.

Common mistakes

Most broken setups are a policy that does not match real senders, a jump straight to reject, or reports that nobody opens.

  • Publishing p=reject before every real sender aligns. The overview says to ship SPF and DKIM, publish none, read the data, and only then tighten the flag.
  • Leaving out a third-party sender. The overview notes that many domains send through outside systems, and those systems have to pass SPF or sign with an aligned DKIM key.
  • Omitting rua, then expecting a report. RFC 7489 says receivers must not send aggregate reports when the tag is absent.
  • Assuming a pass clears every other filter. The RFC says a receiver may still quarantine or reject mail that passed, because a pass does not mean the stream is wanted.
  • Putting the text on the apex name only. Receivers query _dmarc.example.com.

Final disposition stays with the receiver even under reject. RFC 7489 allows a receiver to accept a failure, and it asks that receiver to add an Authentication-Results header when it does. Treat the policy as a strong request, then confirm behavior in the reports rather than in a single test message.

Frequently asked questions

What does the pct tag change?

RFC 7489 defines pct as an optional integer from 0 to 100. The default is 100, so a missing tag applies the policy to the whole mail stream. A receiver must not apply the requested policy to more than that share of the affected messages. Reports are different: every relevant message still has to be included, and the percentage must not be used to drop reports. Sampling is how an owner tests a stricter policy on part of the stream.

What is the ri tag on a DMARC record?

The ri tag is the requested gap between aggregate reports, in seconds. RFC 7489 says it is optional, it is a 32-bit unsigned integer, and the default is 86400, which is one day. Implementations must be able to send daily reports and should be able to send hourly reports when asked. Anything other than a daily report is best effort. The tag does not change whether a message is quarantined or rejected.

Can a receiver ignore a reject policy?

Yes. RFC 7489 says a receiver may accept mail that fails DMARC even when the domain published p=reject. Disposition is always local policy. If the receiver delivers a failure anyway, the RFC recommends adding an Authentication-Results header. The same section says a receiver may also reject or quarantine mail that passed DMARC, because a pass does not mean the message is wanted. Local filters still apply.

Does a subdomain use a different policy?

The sp tag sets the policy for subdomains of the domain you queried, and it uses the same three values as p. If sp is absent, RFC 7489 says the p value must be used for those subdomains. The tag does not change the policy of the domain that published the record. The RFC also warns that sp is ignored for records published on subdomains of an organizational domain, because of how policy discovery walks up to that domain.

Where should DMARC reports be sent?

Send them to a mailbox you control and that you actually read. RFC 7489 says the addresses in rua and ruf are publicly visible and that reports can be large, so a dedicated address is safer than a personal inbox. Receivers must implement mailto URIs. If the report host is a different domain, the RFC requires an extra authorization check before that host is allowed to receive the reports. A tag with no address means no reports of that kind.

Sources