Skip to content
DMARC Pulse

Learn

SPF vs DKIM vs DMARC: what each does and how they work together

SPF vs DKIM vs DMARC: SPF authorizes servers, DKIM signs messages, DMARC checks the From domain. See how they differ and where each one fails.

In short

SPF vs DKIM vs DMARC is a question of three different jobs: SPF authorizes the sending server, DKIM signs the message and DMARC checks that the domain behind one of those results matches the From address.

SPF and DKIM each give a result for their own domain. DMARC compares that domain with the From address, the sender people see, and says what you want done when none matches.

SPF DKIM DMARC
Domain it checks MAIL FROM and the HELO name d= in the DKIM-Signature header From: header
Where it lives in DNS example.com selector._domainkey.example.com _dmarc.example.com
Example v=spf1 ip4:192.0.2.10 ~all v=DKIM1; k=rsa; p=MIIBIjANBg... (key shortened) v=DMARC1; p=none; rua=mailto:dmarc@example.com

MAIL FROM, the envelope sender, is the bounce address used during delivery. Mail clients do not show it as the sender, so a message can pass SPF with someone else's address in From.

How they differ

SPF vs DKIM

SPF tests the IP address of the connecting server, so the route matters. When a forwarder keeps the original MAIL FROM, SPF usually fails, because the receiver now sees the forwarder's IP. DKIM travels inside the message as a signature. A forwarder that leaves the body and signed headers alone is likely to keep it valid. A mailing list that tags the subject or adds a footer can break it.

DKIM vs DMARC

DKIM signs with a private key whose public half sits in DNS. DMARC signs nothing and holds no key. It reads the DKIM result and adds one condition: the d= domain has to align with the From domain. Aligned means identical or, in the default relaxed mode, under the same organizational domain, so d=example.com aligns with mail from news.example.com. RFC 9989 requires this because a valid signature can come from any domain, even a forger's.

SPF vs DMARC

SPF never compares anything with the From address. DMARC counts only its MAIL FROM result, and only when that domain aligns with the From domain. A service using its own bounce domain can pass SPF there, and DMARC will not count it.

How they work together

A receiver applying DMARC works in this order, though SPF may run earlier, during the connection.

  1. It takes the domain in the From: header and looks for the DMARC record that covers it. With no record, DMARC does not apply.
  2. It runs SPF and DKIM, if it has not done so already, and keeps each domain that passed.
  3. It compares those domains with the From domain. One aligned pass is enough for DMARC to pass.
  4. When DMARC fails, the receiver applies its own local policy, which may take your p= value into account. p=none must not change how it already handles the message.
  5. Receivers that send reports include the result in aggregate reports to your rua= address.

SPF, DKIM and DMARC explained with four messages

Message SPF DKIM DMARC
Your server, with your domain in MAIL FROM and d= Pass, aligned Pass, aligned Pass
A service with its own bounce domain, signing with yours Pass, not aligned Pass, aligned Pass
Forwarded unchanged, with the original MAIL FROM Usually fails Usually passes, aligned Passes when DKIM holds
A service using only its own domain Pass, not aligned Pass, not aligned Fail

To DMARC, that last row looks like a forged message. Any domain owner can publish SPF or sign for its own domain, so a pass proves nothing about the From domain until it aligns.

Common mistakes

  • Reading an SPF or DKIM pass as a DMARC pass. Check the domain behind each result. Where a service allows it, have it sign with your domain. Caution: publish the records it asks for first.
  • Publishing two SPF records. The check returns permerror. Caution: merge them into one and keep every sender, or mail from the one you drop fails SPF.
  • Going straight to p=quarantine or p=reject. Both can stop legitimate mail. Caution: set up DMARC at p=none with rua= first, the usual start RFC 9989 describes. RFC 9989 requires you to fix every legitimate source before you enforce. Forwarded mail usually fails SPF, so the RFC says domains at p=reject must also sign with DKIM.
  • Expecting DMARC to rescue an SPF -all failure. RFC 9989 warns that a hard fail can cause rejection before DMARC runs, even for mail with aligned DKIM. Those messages never reach aggregate reports. Caution: list every sender in SPF before -all; forwarded mail can still be rejected.

Check it now

DMARC, SPF, DKIM, MX, blocklists and BIMI in one score

Frequently asked questions

Do I need SPF, DKIM and DMARC, or is one enough?
DMARC needs at least one aligned pass, and RFC 9989 recommends using both SPF and DKIM. Gmail requires SPF or DKIM from everyone sending to personal Gmail accounts, and all three at more than 5,000 messages a day. Yahoo asks for all three from bulk senders, and Microsoft says domains need the three working together.
What is the difference between DKIM and DMARC?
DKIM signs a message with a key whose public half sits in DNS. DMARC signs nothing. It checks whether the DKIM domain, or the domain that passed SPF, aligns with the From domain. It also publishes what you want receivers to do when neither does.
Can a message pass DMARC if SPF fails?
Yes. DMARC passes when either SPF or DKIM gives an aligned pass. A message forwarded with its original MAIL FROM usually fails SPF, and it still passes DMARC if its DKIM signature stays valid and aligns with the From domain.
Does DMARC replace SPF or DKIM?
No. DMARC does not test servers or signatures by itself. It uses the SPF and DKIM results, and at least one of them has to pass and align.
Which should I set up first?
SPF and DKIM first, then DMARC at p=none with a rua address for reports. That is the order RFC 9989 describes. Move to quarantine or reject only after your reports show that every legitimate source passes DMARC.
Does a DMARC pass mean my email reaches the inbox?
No. RFC 9989 says a pass shows only that the use of your domain was authorized. Receivers may still reject or quarantine a message that passes.

Sources consulted

RFC 7208 §10.3: Mediators
checked 2026-11-08
RFC 9989 §1: Introduction
checked 2026-11-08
RFC 9989 §4.1: DMARC Basics
checked 2026-11-08

Related pages

Keep it healthy

Know the moment something breaks

Point your DMARC reports to DMARC Pulse and see who sends email as your domain, what fails and why — with a calm alert when anything changes.

Free plan: 1 domain, no credit card.