Safeguard
Security Guides•

SPF vs DKIM vs DMARC: what each one proves about an email

SPF checks the sending server, DKIM checks a signature on the message, and DMARC ties them to the From address. A short answer with a comparison table.

Safeguard Security Team
3 min read

SPF proves the sending server is authorized for the envelope domain. DKIM proves a domain signed the message and the signed parts were not altered. DMARC proves that at least one of those results belongs to the same domain as the From address, and tells receivers what to do when none does.

Side by side

SPFDKIMDMARC
What it checksIs the connecting IP allowed for the domainDoes a valid signature verify against a DNS keyDoes an SPF or DKIM pass align with the From domain
Identity usedEnvelope sender (MAIL FROM) and HELO nameThe d= domain in the signatureThe visible From domain
Published asTXT record at the domainTXT record at selector._domainkeyTXT record at _dmarc
Survives forwardingOften notUsually, if content is unchangedPasses if either aligned check survives
Gives reportsNoNoYes, aggregate and failure reports

What each one does not prove

SPF does not look at the From header a person reads. A message can pass SPF using the attacker's own domain in the envelope while showing yours in From.

DKIM says some domain signed the message. RFC 9989 points out that a message can bear a valid signature from any domain, even one used by a bad actor. A signature alone says nothing about the From domain.

DMARC does not read the message content or judge intent. A criminal can register a lookalike domain and pass all three checks on it. Authentication proves identity of a domain, not honesty.

How they fit together

  1. The receiver evaluates SPF on the envelope sender.
  2. It evaluates any DKIM signatures.
  3. It looks up the DMARC record for the From domain.
  4. If SPF or DKIM passed and the domain aligns with From, DMARC passes.
  5. If neither aligned, the policy in the record (none, quarantine or reject) tells the receiver what the domain owner wants.

Receivers may apply their own judgment as well. RFC 9989 says receivers need more analysis than DMARC alone and should not reject solely because of a reject policy.

A practical setup

  • Publish SPF for each sending domain, and keep it under 10 lookups.
  • Sign all outbound mail with DKIM, using your own domain for every service so it aligns.
  • Publish DMARC with rua, then raise the policy in stages. The rollout plan covers the order.
  • Add MTA-STS if you want to protect transport encryption.

For a longer walk through setup, see the existing setup guide.

Quick check

If a message passes DMARC, is it safe?

No. It means the From domain was authenticated and aligned. A fraudster using their own domain can pass. Treat DMARC as one signal about who sent the message.

Do I need both SPF and DKIM?

DMARC needs only one aligned pass. Publishing both is stronger, since forwarding breaks SPF and some content changes break DKIM. Gmail and Yahoo require both for bulk senders.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.