Skip to content
SpoofKiller
Fundamentals

SPF vs DKIM vs DMARC: What Each One Actually Does

Three standards, three jobs. What each one checks, what each one misses, and why you need all of them.

Reading time
6 min read
Last updated
Updated
An analyst's desk seen from above, with printed charts, a magnifying glass, and a stack of envelopes.
Three standards, laid out for comparison. Each one answers a question the other two cannot.
In this guideShow 7 sections

The question usually arrives as a request for a ruling. Which one do I need: SPF, DKIM, or DMARC? It is a reasonable thing to ask and it has an unsatisfying answer, in the way that “which do I need, the lock, the key, or the door?” has an unsatisfying answer. The three were invented at different times by different people to solve different halves of the same problem, and each is nearly useless at the job of the other two.

What follows is the division of labor: what each standard checks, what each one cannot see, and five ordinary messages that show how the three reach a verdict together.

Three standards, three questions

Strip away the syntax, and each standard asks a receiving mail server to answer one question.

  • SPF: Is the server that just connected permitted to send mail for the domain in the envelope sender? It is a check on where the message came from. The details are in what SPF is.
  • DKIM: Does this message carry a valid signature, and for which domain? It is a check on the message itself. See what DKIM is.
  • DMARC: Does either of those results belong to the domain in the From header, and if not, what does that domain’s owner want done? It is a check on the name the reader sees, followed by an instruction. See what DMARC is.

Only the third question concerns the address a human being actually reads. That is the entire reason DMARC exists.

Side by side

SPFDKIMDMARC
StandardRFC 7208RFC 6376RFC 7489
What it authenticatesThe sending server’s IP addressThe message content, by signatureNothing itself; it evaluates the other two
Which domain it looks atEnvelope sender (Return-Path)The d= domain in the signatureThe From header
DNS recordTXT at the domainTXT or CNAME at selector._domainkeyTXT at _dmarc
Survives forwardingNoYes, unless the message is modifiedIf the DKIM signature does
Tells receivers what to do on failureLoosely, through -all or ~allNoYes: none, quarantine, or reject
Reports back to youNoNoYes, daily aggregate reports
Characteristic failureToo many DNS lookupsValid signature, wrong domainLeft at p=none indefinitely

What each one misses on its own

SPF alone

SPF never reads the From header. A forger passes SPF using a domain of his own in the envelope sender and puts yours in the From line. SPF also fails for honest mail the moment a recipient’s server forwards it, because the forwarder’s IP is on nobody’s list.

DKIM alone

DKIM confirms that a domain signed the message. Without DMARC, no rule says which domain it must be. A forger signs with his own key, the signature verifies, and the reader still sees your address. DKIM also has no way to express “all my mail is signed, so treat unsigned mail as fake.” An absent signature is simply absent.

DMARC alone

There is no such thing. DMARC has no authentication mechanism of its own; it is a referee, and a referee needs players. A DMARC record on a domain with neither SPF nor DKIM in order fails all of that domain’s legitimate mail, which under an enforcing policy means it filters or refuses your own messages with great efficiency.

SPF vouches for the truck. DKIM vouches for the seal on the package. DMARC reads the name on the label and asks whether either of them has ever heard of it.

Five messages and their fates

Assume example.com publishes v=DMARC1; p=reject. The DMARC rule is that a message passes if SPF or DKIM passes for a domain aligned with the From header. Here is how that plays out.

MessageSPFDKIMDMARC
1. Staff mail sent from the company’s own mail systemPass, alignedPass, alignedPass
2. Newsletter from a platform that signs as example.com but uses its own bounce domainPass, not alignedPass, alignedPass
3. Message 1, automatically forwarded by the recipient to another mailboxFailPass, alignedPass
4. Receipts from a billing tool nobody configured, signing as its own domainPass, not alignedPass, not alignedFail: rejected
5. A forger with example.com in the From line, and his own SPF and DKIMPass, not alignedPass, not alignedFail: rejected

Three lessons sit in that table.

First, messages 4 and 5 are indistinguishable to a receiver. The neglected billing tool and the criminal produce the same results: everything passes, nothing aligns. This is why moving to an enforcing policy before auditing your senders bounces your own receipts, and why alignment is the concept to understand before any other.

Second, message 3 survives only because of DKIM. A domain that relied on SPF alone would lose every forwarded message under p=reject.

Third, message 2 shows that SPF does not have to align for a third-party sender to work. An aligned signature is enough. Adding that platform’s include: to your SPF record would spend one of your ten DNS lookups and change nothing about the result.

So do you need all three?

Yes, and the reasons are practical, not ceremonial. Since 2024, Google and Yahoo have required bulk senders to authenticate with both SPF and DKIM and to publish a DMARC record, with the From domain aligned to at least one of the two. Smaller senders are held to a lower bar on paper and the same suspicion in practice.

Beyond the requirements, each covers for the others’ bad days:

  • DKIM covers SPF when mail is forwarded.
  • SPF covers DKIM when a relay or gateway modifies a message and breaks its signature, provided the envelope domain is aligned.
  • DMARC gives both of them a point, by tying the result to the From address, and gives you the reports to see when either is failing.

If forced to rank them, aligned DKIM does the most work, DMARC makes the work count, and SPF is the backstop. But the ranking is academic. All three are DNS records. The cost of having all of them is an afternoon.

The order to set them up

  1. See what exists. A domain health check reports on all three at once. Many domains turn out to have an SPF record someone wrote in 2016 and nothing else.
  2. Fix SPF. One record, under ten lookups, listing the services that really send for you. The SPF checker counts the lookups; the SPF generator merges senders into a single record.
  3. Turn on DKIM everywhere. At your mail provider and at every service that sends as your domain, enable signing with your own domain. Verify each selector with the DKIM checker.
  4. Publish DMARC at p=none with a reporting address. The steps are in how to configure DMARC.
  5. Read the reports, fix what fails, raise the policy. This is the stage that takes weeks instead of minutes, and the one where DMARC monitoring earns its keep: it names the services behind the IP addresses and shows which are failing alignment.

What none of the three will do

Finally, a word on limits, because the trio is often credited with powers it lacks. All three operate on domains. None reads the display name, so “Your Bank Security Team” in front of an unrelated address passes without comment. None covers a lookalike domain registered by someone else; that domain can have immaculate SPF, DKIM, and DMARC of its own. And none can tell that a real account has been taken over, since mail from a compromised mailbox authenticates perfectly.

What the three do, together and enforced by receivers, is make it impractical to send mail from your exact domain without your consent. That is one door among several. It also happens to be the widest, and the only one you can close with three DNS records. For the others, see domain impersonation protection.

FAQ

Questions about SPF vs DKIM vs DMARC

Short answers to what readers ask next. If yours is missing, write to us and a person will reply.

Ask a question

Free, no obligation

Want a second pair of eyes on your records?

Send us your domain. We will look at its DMARC, SPF, and DKIM setup and write back, in plain English, with what we found and what to fix first.

  • A person reads your records, not a script
  • Specific fixes, in order of importance
  • No sales sequence afterward

We use your details to reply. Nothing else.

Reading about it is the slow way.

Run the free check and see your own domain's DMARC, SPF, and DKIM in the time it took to read this paragraph. No account, no card.