SPF, DKIM and DMARC Explained for Senders
Updated
Short answer: SPF and DKIM are email authentication for your sending domain. DMARC adds a policy and checks that the domain SPF or DKIM authenticated aligns with the domain in your From: address. Gmail and Yahoo require SPF or DKIM from every sender and all three from bulk senders, and Outlook.com requires all three from domains that send more than 5,000 emails a day.
What each one does
You publish all three as DNS records for your domain. Microsoft tells senders to "Publish SPF and DKIM records for the domain", and Google treats a missing DMARC record as a problem in its own right.
- SPF authenticates the domain you send from. Google asks every sender to "Set up SPF or DKIM email authentication for your sending domains." Microsoft says SPF "Must Pass for the sending domain."
- DKIM adds a signature to each message. Microsoft says it "Must Pass to validate email integrity and authenticity." The signature is carried in a
DKIM-Signatureheader field, and itsh=tag lists header fields the signature covers. Gmail and Yahoo both require a key of at least 1024 bits. - DMARC is a record with a policy. Google: "Your DMARC enforcement policy can be set to none." The policy is written as
p=noneor, stricter,p=reject. DMARC passes using SPF or DKIM, as long as the domain that passed aligns with your From: domain.
Alignment
Google defines it: "For direct email, the domain in the sender's From: header must be aligned with either the SPF domain or the DKIM domain. This is required to pass DMARC alignment."
SPF and DKIM can pass for a domain that isn't the one in your From: address. When neither of them aligns, DMARC fails even though both checks passed. Gmail's message for rate-limit code 4.7.32 describes this case: "Your email has been rate limited because the From: header (RFC5322) in this message isn’t aligned with either the authenticated SPF or DKIM organizational domain."
How strict each provider is:
- Gmail: "only one of these needs to be aligned to meet the sender alignment requirements." But Google adds: "It’s likely that DMARC alignment with both SPF and DKIM will eventually be a sender requirement."
- Yahoo: "Ensure the domain in the From: header is aligned with either the SPF domain or the DKIM domain." It adds that "Relaxed alignment is acceptable".
- Outlook.com: DMARC must "align with either SPF or DKIM (preferably both)."
All three accept one aligned check today, and two of them point toward both. If you can align SPF and DKIM, do.
What Gmail, Yahoo and Outlook.com require
| Provider | Every sender | Bulk or high-volume senders |
|---|---|---|
| Gmail | SPF or DKIM | SPF and DKIM, a DMARC record whose policy can be p=none, and a From: domain aligned with SPF or DKIM |
| Yahoo | SPF or DKIM at a minimum | SPF and DKIM, a DMARC policy of at least p=none that passes, and a From: domain aligned with SPF or DKIM |
| Outlook.com | The 2025 rules target domains sending more than 5,000 emails a day | SPF and DKIM must both pass, and DMARC must be at least p=none and aligned with SPF or DKIM, with p=reject recommended |
On key length, Google says "Sending to personal Gmail accounts requires a DKIM key of 1024 bits or longer", and Yahoo says "We require a DKIM key length of 1024 bits or greater".
Who counts as a bulk sender differs. Google's line is around 5,000 messages a day to personal Gmail accounts, though its pages word it several ways. Yahoo "will not specify a volume threshold". Microsoft's announcement says more than 5,000 emails a day. The details are in Gmail and Yahoo Bulk Sender Requirements and Outlook.com Rules for High-Volume Email Senders.
What failure looks like
| Where | What you may see |
|---|---|
| Gmail | Unauthenticated mail "might be marked as spam or rejected with a 5.7.26 error." |
| Gmail | 4.7.31: rate limited because the sending domain has no DMARC record, or the record sets no policy |
| Gmail | 4.7.32: rate limited because the From: header isn't aligned with the SPF or DKIM domain |
| Yahoo | Mail "may be sent to the spam folder or rejected." |
| Outlook.com | Mail sent to Junk, or rejected with 550 5.7.515 |
Microsoft's support article explains that last error: "your message was rejected because the domain in your 5322.From email address (also known as the From address or P2 sender) didn't pass the required email authentication level for senders of large volumes of email to Microsoft consumer email services."
Set them up, step by step
- List every service that sends mail with your domain in the From: address, such as your email platform, CRM and help desk. Each one has to pass the checks below.
- Publish SPF for your sending domain, and check that it passes.
- Turn on DKIM signing with a key of 1024 bits or longer, publish the DKIM record, and check that it passes.
- Publish a DMARC record with a policy of at least
p=none. - Check alignment: the From: domain must align with the SPF domain or the DKIM domain. Align both if you can.
- Look up your records, then watch your sending logs for the codes in the table above.
- Once everything passes, consider a stricter policy. Microsoft's Postmaster page recommends
p=reject.
DKIM also matters for unsubscribing: RFC 8058 says one-click unsubscribe headers "MUST be covered by the signature". One-Click Unsubscribe (RFC 8058) Explained covers the rest.
Common mistakes
- A DMARC record without a policy. Gmail's
4.7.31covers a record that "doesn’t specify a DMARC policy." - SPF or DKIM passing for the wrong domain. If neither aligns with your From: domain, DMARC fails on alignment.
- A DKIM key shorter than 1024 bits. Gmail and Yahoo both require at least 1024.
- Only one of SPF and DKIM. Bulk senders need both at Gmail and Yahoo, and both must pass at Outlook.com.
Precheckly's free SPF, DKIM and DMARC checker looks up your domain's SPF, DKIM (with an optional selector), DMARC and MX records, and suggests a fix for each problem it finds. It checks DNS only, not message headers.
Sources
- Email sender guidelines, Google
- Email sender guidelines FAQ, Google
- Sender Best Practices, Yahoo Sender Hub
- FAQs, Yahoo Sender Hub
- Strengthening Email Ecosystem: Outlook's New Requirements for High-Volume Senders, Microsoft
- Policies, Outlook.com Postmaster (Microsoft)
- Fix NDR error "550 5.7.515" in Outlook.com, Microsoft Support
- RFC 8058: Signaling One-Click Functionality for List Email Headers, IETF
Not legal advice. Carrier rules and provider documentation change, so check the linked sources before you rely on them.