DMARC, SPF and DKIM Setup: Rules, Dates and Rollout Plan
SPF checks which servers may send mail for a domain, DKIM checks that a message was signed by a domain and not altered, and DMARC requires one of those two checks to pass for a domain that matches the From address the reader sees (by default, the same organizational domain is enough), then tells receivers what the domain owner wants done with failures. As of December 2026, the current DMARC standard is RFC 9989 (Standards Track, May 2026), which obsoletes RFC 7489 and RFC 9091. Google and Yahoo have required bulk senders to publish at least a p=none DMARC record since February 2024, and Microsoft has required the same of domains sending more than 5,000 emails a day to Outlook.com since May 5, 2025. The protection against spoofing starts only when the policy moves to p=quarantine or p=reject.
What each protocol checks
| SPF | DKIM | DMARC | |
|---|---|---|---|
| Standard | RFC 7208, April 2014 (Proposed Standard) | RFC 6376, September 2011 (Internet Standard, STD 76) | RFC 9989, May 2026 (Proposed Standard), with reports in RFC 9990 and RFC 9991 |
| Question answered | Is this server’s IP authorized by the domain? | Did the signing domain vouch for this message, unaltered? | Does an authenticated domain match the From domain, and what should happen if not? |
| Identity checked | The SMTP envelope sender (MAIL FROM) or the HELO name; DMARC uses only the MAIL FROM result | The d= domain in the DKIM-Signature header | The From header domain (the “Author Domain”) |
| Published as | TXT record at the domain | TXT record at selector._domainkey.domain | TXT record at _dmarc.domain |
| Survives forwarding? | Usually not, because the forwarder’s IP is not listed | Yes, unless the forwarder changes signed content | Passes if either SPF or DKIM passes with alignment |
| Alone, stops forged From? | No | No | Only for the exact domain, at receivers that honor quarantine or reject |
SPF: authorized sending servers
RFC 7208 defines a DNS record that lists the hosts allowed to send for a domain. A receiver compares the connecting IP address with the record and returns a result such as pass, fail, softfail, neutral, temperror or permerror. A softfail is, in the RFC’s words, “a weak statement by the publishing ADMD that the host is probably not authorized.”
SPF evaluates the envelope identity, not the From header people read, so an attacker can pass SPF for their own domain while displaying yours. The RFC also caps the cost of evaluation: the include, a, mx, ptr and exists mechanisms and the redirect modifier count toward a limit of 10 DNS-querying terms, and exceeding it must produce a permerror. Implementations should also limit “void lookups” (queries that return no records) to two, and exceeding that limit is a permerror as well.
DKIM: a signature tied to a domain
RFC 6376 has the sender sign selected headers and the body with a private key. The signature travels in a DKIM-Signature header whose d= tag names the signing domain, s= the selector and bh= the body hash. The receiver fetches the public key from s._domainkey.d in DNS. The From header must be among the signed headers.
Key length is set by RFC 8301 (January 2018): signers MUST use RSA keys of at least 1024 bits and SHOULD use at least 2048 bits, and the old rsa-sha1 algorithm MUST NOT be used for signing or verifying. RFC 8463 (September 2018) added an Ed25519 signing algorithm. A valid signature proves only that the d= domain signed the message. An attacker can sign with their own domain, which is why DKIM alone says nothing about the From address.
DMARC: alignment plus a policy
RFC 9989 states that a DMARC pass “requires not only an SPF or DKIM pass verdict for the email message but also and more importantly that the domain associated with the SPF or DKIM pass be ‘aligned’ with the Author Domain”. There are two alignment modes: relaxed (same Organizational Domain, the default for both aspf and adkim) and strict (identical domains). RFC 9989 finds the Organizational Domain with a “DNS Tree Walk” that queries _dmarc records up the domain hierarchy, replacing the public suffix list that RFC 7489 relied on. The same text warns that a DMARC pass “does not guarantee that delivery to the recipient’s inbox would be safe or desirable”: it says the domain use was authorized, not that the content is harmless.
Policy (p=) | What the RFC says the owner is expressing |
|---|---|
none | No preference expressed (monitoring mode) |
quarantine | Failing mail is suspicious; it may still be valid |
reject | Failure is a clear sign the domain use is not valid |
A worked alignment example, with the From address [email protected]:
| Scenario | SPF result and domain | DKIM result and domain | DMARC outcome |
|---|---|---|---|
| Marketing platform sends with its own bounce domain and no custom DKIM | pass, bounce.mailer.example.net | none | Fail: the only pass is for an unrelated domain |
| Same platform with DKIM set up for your domain | pass, bounce.mailer.example.net | pass, d=example.com | Pass through DKIM |
Platform signs with d=mail.example.com | pass, bounce.mailer.example.net (not aligned) | pass, d=mail.example.com | Pass under relaxed alignment (the default); fail with adkim=s, because the domains are not identical (RFC 9989 Table 1 gives the same pattern) |
| Message forwarded unchanged to another mailbox | no pass (the forwarder’s IP is not in your record) | pass, d=example.com | Pass through DKIM |
| Mailing list keeps your From address but adds a footer and a subject tag | pass for the list’s own bounce domain, not aligned | fail (signed content changed) | Fail |
What Google, Yahoo and Microsoft require
Mailbox providers turned authentication from advice into a delivery condition for large senders. As of December 2026, their own pages say:
| Requirement | Google (personal Gmail accounts) | Yahoo (domains hosted by Yahoo Mail) | Microsoft (Outlook.com) |
|---|---|---|---|
| In force since | February 1, 2024; “Starting November 2025, Gmail is ramping up its enforcement on non-compliant traffic” | February 2024, with enforcement “gradually rolled out”; one-click unsubscribe enforced from June 2024 | May 5, 2025 |
| Bulk threshold | ”close to 5,000 messages or more” in 24 hours, counting all mail from the same primary domain; the status is permanent | None published: Yahoo “will not specify a volume threshold” | More than 5,000 emails a day |
| Every sender | SPF or DKIM; valid forward and reverse DNS (PTR); TLS; spam rate under 0.3%; RFC 5322 format | SPF or DKIM; valid forward and reverse DNS; spam rate under 0.3%; RFCs 5321 and 5322 | Valid reverse DNS; IETF standards; SPF, DKIM and DMARC strongly recommended |
| Bulk senders | SPF and DKIM; DMARC, which may be p=none; From domain aligned with the SPF or DKIM domain | SPF and DKIM; DMARC of at least p=none, which must pass; relaxed alignment acceptable | SPF and DKIM must pass; DMARC of at least p=none (p=reject recommended), aligned with SPF or DKIM, preferably both |
| Unsubscribe | One-click for marketing and subscribed mail, plus a visible link; requests fulfilled within 48 hours | One-click List-Unsubscribe (RFC 8058 POST “highly recommended”), a visible link, unsubscribes honored within 2 days | A clearly documented unsubscribe mechanism that is easy to find and use |
| DKIM key | 1024 bits or longer; 2048 recommended | 1024 bits or longer; 2048 recommended | Not stated |
| Spam rate | Below 0.10%, never 0.30% or higher (Postmaster Tools) | Below 0.3%, counted on mail delivered to the inbox | Not stated |
| Falling short | Spam folder, or temporary or permanent rejection; unauthenticated mail can get a 5.7.26 error | Spam folder or rejection, with a specific error code | Junk folder, then rejection with “550; 5.7.515” if unresolved |
Sources: Google’s Email sender guidelines and sender guidelines FAQ, Yahoo’s Sender Requirements & Recommendations and FAQs, and Microsoft’s Outlook.com Postmaster policies, all read in December 2026. Google also tells every sender not to impersonate Gmail From: headers, because Gmail “will begin using a DMARC quarantine enforcement policy”.
The practical reading is the same across providers. A DMARC record at p=none satisfies each bulk-sender rule above, and it blocks nothing: RFC 9989 says discovered policies of p=none “MUST NOT modify existing mail handling processes”. Spoofing of your exact domain is stopped only once receivers see quarantine or reject. Google’s FAQ adds: “It’s likely that DMARC alignment with both SPF and DKIM will eventually be a sender requirement.” Microsoft already says it prefers alignment with both.
Rollout plan: from p=none to p=reject
RFC 9989 section 5.1 gives the order: get SPF and DKIM working, create a mailbox for aggregate reports, publish p=none with a rua tag, analyze the reports, fix unaligned legitimate mail, then decide on enforcement. It notes that “it may take many months” of reports before an owner is sure all its mail authenticates, and that unaligned legitimate streams “MUST be addressed prior to any attempt” to enforce.
| Phase | DNS record at _dmarc.example.com | Minimum time | Exit test |
|---|---|---|---|
| 0. Inventory | none yet | 1 to 2 weeks | Every system that sends as your domain is listed: mail platform, marketing, billing, ticketing, CRM, scanners |
| 1. Monitor | v=DMARC1; p=none; rua=mailto:[email protected] | At least one month (RFC 9989 section 7.4 advises this for domains whose users post to mailing lists) | Every legitimate source in the reports passes with alignment; unknown sources identified |
| 2. Test enforcement | v=DMARC1; p=quarantine; t=y; rua=mailto:[email protected] | 2 to 4 weeks | Compared with phase 1, the reports show how much mail passes through forwarders and lists that don’t rewrite the From line; no legitimate source still fails |
| 3. Quarantine | v=DMARC1; p=quarantine; rua=mailto:[email protected] | As long as phase 1 | No complaints about mail in junk; disposition results compare cleanly with phase 1; every legitimate stream carries an aligned DKIM signature |
| 4. Reject | v=DMARC1; p=reject; rua=mailto:[email protected] | Ongoing | Review reports monthly; add every new sender before it goes live |
The month at none and the equal period at quarantine come from RFC 9989 section 7.4; the other durations are planning figures. Domains with quarterly or annual mail cycles (invoicing, enrollment, tax notices) need reports that span those cycles.
Four details from the RFC shape the plan:
- The
ttag replacespct. Appendix A.6 of RFC 9989 says thepcttag was “usually not accurately applied” unless set to 0 or 100 (the default), and the IANA table lists it as historic. The newt=yflag is meant to work like the oldpct=0: receivers apply one level below the stated policy, soquarantineis treated asnoneandrejectasquarantine, and they may apply special handling such as rewriting the From line. It does not affect report generation. Google’s BIMI setup page, last updated 2026-11-10, still asks forpct=100, the old default. - Subdomains.
spsets a policy for existing subdomains and the newnptag for non-existent ones. Withoutspornp, thepvalue applies to subdomains. - Aggregate versus failure reports.
ruarequests aggregate reports, which RFC 9990 defines as XML documents; without aruatag, receivers must not send them.rufrequests per-message failure reports (RFC 9991); receivers are not obliged to send them, RFC 9989 notes that most refuse for privacy reasons, and they can carry message content, so plan aroundrua. If a report address is in another organizational domain, that domain must publish a TXT record containingv=DMARC1at<your domain>._report._dmarc.<report domain>, or receivers ignore the address (RFC 9990 section 4). - Mailing lists are the cost of
p=reject. RFC 9989 section 7.4 says domains that host users who might post to mailing lists SHOULD NOT publishp=reject; those that do should stop users posting to Internet lists or warn them that list participation may be hindered. A domain atp=rejectMUST NOT rely on SPF alone and MUST sign its mail with valid DKIM, because forwarding breaks SPF. Receivers, for their part, MUST NOT reject on ap=rejectpolicy alone; absent other analysis, they must treat failing mail as if the policy werequarantine.
Sample records
All names and addresses below are documentation values: example.com, example.net and example.org are reserved for examples by RFC 2606, and 192.0.2.0/24 and 198.51.100.0/24 by RFC 5737.
; SPF at example.com
example.com. IN TXT "v=spf1 ip4:192.0.2.0/24 ip4:198.51.100.17 include:_spf.mailer.example.net ~all"
; DKIM public key at selector "s2026a" (the key is a placeholder here)
s2026a._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=<base64 public key>"
; DMARC, monitoring phase
_dmarc.example.com. IN TXT "v=DMARC1; p=none; rua=mailto:[email protected]"
; DMARC, enforcement with explicit subdomain policies
_dmarc.example.com. IN TXT "v=DMARC1; p=reject; sp=reject; np=reject; rua=mailto:[email protected]"
Reading the SPF line: ip4 terms cost no DNS lookups, and the single include costs one lookup plus whatever the included record itself contains. If _spf.mailer.example.net pointed to two more includes and an mx, that one include would use at least four of the 10 allowed terms. Each additional vendor adds its own chain, which is how large organizations reach permerror. The usual fixes are removing vendors that no longer send, replacing broad include chains with ip4 ranges the vendor documents, and moving each vendor onto its own subdomain.
On the choice between ~all and -all: RFC 9989 section 7.1 warns that some receivers evaluate SPF early in the SMTP session, so a -all hard fail “could cause a message to be rejected early”, before DMARC runs, even if aligned DKIM would have passed. Such rejections never appear in aggregate reports. RFC 7208 says receivers SHOULD NOT reject a message on a softfail alone, so with ~all a failing message still reaches DMARC evaluation, where an aligned DKIM signature can pass it.
Domains that never send mail
The UK NCSC’s blog post on parked domains (last reviewed 5 March 2025) says DMARC matters as much on non-sending domains, since “unprotected, non-email sending domains can just as easily be used for email spoofing”. It lists four steps, in order: SPF with no permitted senders, DMARC at reject, a null MX record (RFC 7505), and a wildcard DKIM record with an empty key, which revokes any cached keys. A domain with a null MX cannot receive its own reports, so the sample sends them to example.com, which must accept them with the record RFC 9990 requires:
example.org. IN TXT "v=spf1 -all"
_dmarc.example.org. IN TXT "v=DMARC1; p=reject; rua=mailto:[email protected]"
example.org. IN MX 0 .
*._domainkey.example.org. IN TXT "v=DKIM1; p="
; published by example.com: it accepts reports about example.org
example.org._report._dmarc.example.com. IN TXT "v=DMARC1"
What authentication does not stop
NIST SP 800-177 Rev. 1, Trustworthy Email (February 2019), recommends SPF, DKIM and DMARC for federal systems and says its guidance is also useful to small and medium-sized organizations. The FBI, the State Department and the NSA made the point about weak policies in a joint advisory dated May 2, 2024, North Korean Actors Exploit Weak DMARC Security Policies. In its sample header, SPF and DKIM passed for a university’s email account, which the agencies say implies the actor had gained access to it. DMARC failed because the From address showed a think tank’s domain, and the p=none policy meant the message still reached the inbox. The agencies recommend p=quarantine or p=reject and note that the Cross-Sector Cybersecurity Performance Goals developed by CISA and NIST (CPG 2.M) recommend enabling DMARC and setting it to reject.
Enforcement protects the exact domain in the From address; RFC 9989 says DMARC “does not address the use of visually similar domain names or abuse of the RFC5322.From human-readable display name”. Enforcement does not cover:
- Lookalike domains. The attacker authenticates their own domain; see brand impersonation detection and defense, which also covers BIMI.
- Display-name tricks that show a trusted name above an unrelated address.
- Compromised legitimate accounts, including a supplier’s, whose mail passes authentication.
- Other organizations’ domains that publish no enforcing policy.
Pair authentication with email filtering, payment verification (see business email compromise) and MFA. To see SPF, DKIM and DMARC results on a single message, follow the email header analysis guide.
Common mistakes
- Staying at
p=none. It provides reports and no protection. - Enforcing before the inventory is finished. Missed senders fail once enforcement begins.
- Authenticating the vendor’s domain instead of yours. Mail passes SPF for the vendor’s bounce domain and still fails DMARC; set up custom DKIM so the signing domain is yours.
- Exceeding the SPF limit. More than 10 DNS-querying terms returns
permerror. - Ignoring forwarding and lists. Forwarded mail usually fails SPF and relies on DKIM surviving, which is why RFC 9989 requires DKIM signing at
p=reject; list software that alters messages but keeps your From address leaves neither check aligned. - Reading raw XML. RFC 9989 recommends machine-parsing aggregate reports; use a parser or a DMARC reporting service.
- Leaving unused domains open. Publish the non-sending records above.
Sources
- RFC 9989, DMARC (May 2026)
- RFC 9990, DMARC aggregate reporting (May 2026)
- RFC 9991, DMARC failure reporting (May 2026)
- RFC 7208, Sender Policy Framework (April 2014)
- RFC 6376, DomainKeys Identified Mail signatures (September 2011)
- RFC 8301, DKIM cryptographic algorithm and key usage update (January 2018)
- RFC 8463, Ed25519 for DKIM (September 2018)
- RFC 7505, Null MX (June 2015)
- RFC 2606, Reserved top-level DNS names (June 1999) and RFC 5737, IPv4 address blocks reserved for documentation (January 2010)
- Google, Email sender guidelines and Email sender guidelines FAQ
- Yahoo Sender Hub, Sender Requirements & Recommendations and FAQs
- Microsoft, Outlook.com Postmaster: Policies, Practices, and Guidelines
- NIST SP 800-177 Rev. 1, Trustworthy Email (February 2019)
- FBI, State Department and NSA, North Korean Actors Exploit Weak DMARC Security Policies to Mask Spearphishing Efforts (May 2, 2024)
- UK NCSC, Protecting parked domains for the UK public sector (last reviewed 5 March 2025)
- Google Workspace Help, Set up BIMI (last updated 2026-11-10)
This content is for educational purposes only. Email authentication involves DNS changes that can affect delivery. Test in monitoring mode before enforcing.