Guide · Authentication: SPF, DKIM, DMARC

SPF vs DKIM vs DMARC: what each one checks

SPF checks whether the server that connected may send for the envelope sender's domain. DKIM checks whether a domain signed the message and the signed parts still verify. DMARC checks whether at least one of those passes belongs to the domain in the visible From address, and lets that domain's owner ask receivers how to treat mail that fails and send reports. So SPF and DKIM can both pass while DMARC fails: they passed for a domain that is not yours.

Reading time
7 min

The three checks at a glance

ItemSPFDKIMDMARC
Question it answersMay this server send for this envelope domain?Did this domain sign the message, unchanged?Does a pass match the visible From domain?
Domain it checksThe SMTP MAIL FROM domain (or HELO)The signing domain, d= in the signatureThe From header's domain
Where it lives in DNSA TXT record at that domainA key at <selector>._domainkey.<domain>A TXT record at _dmarc.<domain>
What breaks itForwarding; more than 10 DNS lookupsEdits to signed parts, such as a list footerNo aligned SPF or DKIM pass
StandardRFC 7208RFC 6376RFC 9989 (May 2026)
Check yoursSPF checkerDKIM checkerDMARC checker

One message, three domains

A receipt can carry three different domains, and each check looks at a different one:

FieldExampleChecked by
Visible Fromreceipts@example.comDMARC (the author domain)
Envelope sender (MAIL FROM, Return-Path)bounce@bounce.example.comSPF
DKIM signatured=example.com; s=receiptsDKIM

The visible From is what the reader sees. The envelope sender is part of the SMTP conversation and receives bounces (envelope sender vs From). The signing domain can be yours, your sending service's, or one you set up for one mail stream.

SPF: may this server send for the envelope domain?

DKIM: who signed, and does it still verify?

DMARC: does a pass match the visible From?

Why SPF and DKIM pass but DMARC fails

A synthetic Authentication-Results header, the kind a receiver adds to a message it accepted:

Authentication-Results: mx.receiver.example;
  spf=pass smtp.mailfrom=bounce.vendor.example;
  dkim=pass header.d=vendor.example;
  dmarc=fail header.from=example.com

Both passes belong to the vendor. Neither vendor.example domain aligns with example.com, so DMARC fails. The fix is a custom envelope domain or DKIM signing domain under example.com, set up as your sending service explains. Weakening the DMARC policy does not fix alignment.

What the receiver sawDMARCWhat to do
SPF pass for bounce.example.com, DKIM failsPass (relaxed SPF)Fix DKIM, so forwarding cannot break it
SPF fails after forwarding, DKIM pass for example.comPass (aligned DKIM)Nothing urgent: aligned DKIM carried it
SPF and DKIM pass only for vendor.exampleFailSet up an aligned envelope or signing domain
SPF pass for bounce.example.com with aspf=s, no aligned DKIMFailUse relaxed alignment, or the exact domain

These assume a valid DMARC record and no other aligned signature. Whether a message passes DMARC and what the receiver then does with it are separate decisions.

Check DNS, then a real message

DNS shows what you published, not which domains a given message used. Check both:

  1. List every sender: office mail, receipts, password resets, support desk, marketing, and each outside service, including rare mail such as a yearly reminder.
  2. Check what is published for each envelope domain, selector and From domain with the SPF, DKIM and DMARC checkers.
  3. Send a real message through each route to a test mailbox you control at another provider.
  4. Read the receiver's Authentication-Results header in the original message. Compare smtp.mailfrom, header.d and the From domain. Trust only the header your receiving system added: RFC 8601 tells receivers to remove copies that claim to be theirs but came from outside.
  5. Test forwarded and list mail separately. Forwarding usually breaks SPF; a list footer or subject tag can break DKIM; ARC lets a receiver see earlier results, but does not turn a fail into a pass (ARC and forwarded mail).
  6. Write down which route you tested and which aligned domain passed, then repeat the same checks after any change.

Roll out DMARC after you know your senders

  1. Start with p=none and a rua= address for aggregate reports. Monitoring asks for no action; it does not make failing mail pass.
  2. Fix alignment for every legitimate sender the reports and your tests show.
  3. Move to quarantine, then reject, once your own mail passes (from p=none to p=reject).

Older advice may be out of date. RFC 9989 (May 2026) replaced RFC 7489 and RFC 9091. It finds the policy and the organizational domain by a DNS tree walk instead of the Public Suffix List, removes the pct tag, and adds t (test mode, a yes-or-no flag rather than a percentage: with t=y receivers do not apply the policy as written) and np (policy for subdomains that do not exist). RFC 9990 covers aggregate reports and RFC 9991 failure reports.

What none of the three checks

SPF, DKIM and DMARC say who may send as a domain. They do not say a recipient's mailbox exists, that the person asked for your mail, or that a message reaches the inbox. A lookalike domain or a compromised real account can send mail that passes all three. Checking recipient addresses is a separate job (what email verification checks).

Questions

Do I need all three?

Set up all three for every domain you send from. DMARC needs only one aligned pass, but mailbox providers set their own rules: Gmail asks every sender for SPF or DKIM and bulk senders for SPF, DKIM and DMARC (Gmail and Yahoo sender requirements).

Can DKIM carry DMARC when SPF fails?

Yes. One valid DKIM signature whose domain aligns with the From domain is enough, which is why aligned DKIM keeps forwarded mail passing.

Does p=none make DMARC pass?

No. p=none says the domain owner expresses no handling preference. The DMARC result is still pass or fail.

Do subdomains inherit SPF?

No. SPF is checked at the exact envelope domain. DMARC is different: a subdomain without its own record uses the policy found by the tree walk, which the sp and np tags can tune.

What RSA key size should DKIM use?

At least 2048 bits, as RFC 8301 recommends; 1024 is the minimum it allows. Check which sizes your sending service supports.

Try it

Look up your domain's records with the free SPF, DKIM and DMARC checkers. To check the recipients instead, use the free email checker or bulk email verification.

Sources

How we wrote this: drafted by the email-validation.org team with the help of AI writing tools, from our product documentation and the sources linked in the text.

Get up to 500 free credits. No card needed.

New accounts get 500 free credits (100 when you sign up with a free email provider such as Gmail, Outlook or Yahoo, another personal mailbox such as a paid one like Fastmail or one from your internet provider, or an address from a relay or alias service). Try it on your own list before you buy.

Updated · Maintained by: Email Validation LLC