Skip to content
ProfitTool
Back to all articles
Privacy & Security
2 min read

SPF vs DKIM vs DMARC: How Email Authentication Works

SPF, DKIM and DMARC work together to protect your domain from email spoofing and phishing. This guide explains what each one does and why you need all three.

ProfitTool Team

Security & Dev

Why Email Is Easy to Forge

SMTP — the protocol that carries email — was designed in 1982 with no authentication. Any server can claim to send email from any address. SPF, DKIM and DMARC are the three DNS-based standards that fix this, each addressing a different layer of the problem.

SPF — Who Can Send

Sender Policy Framework lets a domain publish a list of authorised sending IP addresses in DNS. When a receiving server gets a message, it checks whether the sending server's IP is on that list.

  • Validates: the envelope sender (SMTP MAIL FROM)
  • Does not validate: the visible From header in the email client
  • Limitation: breaks when email is forwarded (the forwarding server's IP is not on the original SPF list)

DKIM — Was It Tampered With

DomainKeys Identified Mail adds a cryptographic signature to outgoing emails. The sending server signs specific headers and the message body using a private key. The public key is published in DNS. Receiving servers verify the signature.

  • Validates: message integrity and that the signing domain sent it
  • Survives forwarding (the signature travels with the message)
  • Does not validate: the visible From header directly

DMARC — Do They Align, and What Should Happen

Domain-based Message Authentication, Reporting and Conformance ties SPF and DKIM together and adds policy enforcement. DMARC requires that at least one of SPF or DKIM aligns with the visible From domain — not just any domain.

DMARC also tells receiving servers what to do with failing messages:

  • p=none — monitor only, deliver everything
  • p=quarantine — send failing messages to spam
  • p=reject — reject failing messages outright

And it provides reporting — aggregate (rua) and forensic (ruf) reports sent back to you so you can see who is sending email as your domain.

The Correct Setup Order

  1. Add SPF record
  2. Configure DKIM signing on your email platform
  3. Verify both are working
  4. Add DMARC with p=none and rua reporting
  5. Review reports for 2–4 weeks
  6. Gradually move to p=quarantine then p=reject

Quick Reference

StandardWhat it checksSurvives forwardingPrevents spoofing
SPFSending server IPNoPartially
DKIMMessage signatureYesPartially
DMARCAlignment + policyYesYes (with reject)

Check your domain's configuration with our SPF Checker, DKIM Checker and DMARC Checker.

Tags:#spf#dkim#dmarc#email security#email authentication

ProfitTool Team

Security & Dev

Written and maintained by the ProfitTool team. Where an article references a ProfitTool utility, the behaviour described is the behaviour of the tool on this site — you can open it and check the output yourself.