One Click Answers

In plain English

SPF vs DKIM vs DMARC: What Is the Difference?

The Simple Answer

SPF lists the servers allowed to send mail for a domain. DKIM adds a signature that proves the message was not changed and came from a domain that holds the key. DMARC checks that one of them matches the From address people see, and tells receivers what to do if neither does.

What does each one do?

All three are stored as DNS records. DNS is the public directory that turns a domain name into settings and addresses. A receiving mail server reads these records when a message arrives.

Think of SPF as a guest list at the door. DKIM is a wax seal on the envelope. DMARC is the rule that says the name on the invitation must match the guest list or the seal, and what to do with anyone who does not match.

SPF, DKIM and DMARC side by side
ItemQuestion it answersDNS record typeWhat it checks
SPFIs this server allowed to send?TXTThe sending server against your list
DKIMIs this message signed and unchanged?TXT (or CNAME)A signature in the message header
DMARCDoes a pass match the From domain?TXTAlignment, then your policy
MXWhere does incoming mail go?MXNot authentication, only delivery

How do the three work together?

SPF and DKIM each give a pass or fail. On their own they can pass for a different domain than the one in the From line. A sending service might sign mail with its own domain, for instance.

DMARC closes that gap. It needs an SPF pass or a DKIM pass that aligns with the From domain. Only one aligned pass is required, not both. Its policy has three settings: none (only report), quarantine (treat as suspicious) and reject (refuse).

Example: a passing result that does not align

Assume a shop sends from shop.example, using a newsletter service.

The service signs mail with its own domain, so DKIM passes for the service.

The From line shows shop.example, so that DKIM pass does not align.

SPF also passes for the service's domain, so it does not align either.

DMARC fails until the shop sets up the service's custom domain signing.

Example: one aligned pass is enough

Assume staff mail is sent from the shop's own mail provider.

SPF passes and aligns with shop.example.

DKIM is missing, so it gives no result.

DMARC still passes, because one aligned result is enough.

What mistakes should I avoid when setting up SPF, DKIM and DMARC?

  • Publishing two SPF records. A domain should have only one SPF record.
  • Adding too many lookups to SPF. The standard allows 10 DNS lookups, and going over makes SPF fail.
  • Forgetting a sender such as a billing system, form tool or newsletter service.
  • Jumping straight to a reject policy before checking real results.
  • Assuming that a published record proves every message uses it.
  • Deleting old DKIM records while a service still signs with them.

What changes the answer when setting up SPF, DKIM and DMARC?

Forwarded mail can break SPF, because the forwarding server is not on your list. DKIM usually survives forwarding if the message is not altered. This is one reason DMARC accepts either result.

Each service you use may need its own setup, and its instructions come first. Receivers may also have their own rules, so check each provider's current requirements. A DMARC record can ask for reports, which show who is sending mail in your domain's name.

Google's sender guidelines FAQ says a bulk sender is one that sends close to 5,000 or more messages to personal Gmail accounts in 24 hours. For those senders it requires SPF and DKIM, a DMARC record with at least a policy of none, and one-click unsubscribe on marketing mail.

The SPF standard (RFC 7208) lets a domain say which hosts may send for it, and limits the number of lookups an SPF record may cause to 10. The DMARC document (RFC 7489) describes policies that range from no action, through altered delivery, to rejection; its page notes that newer documents have since replaced it.

A pass does not promise the inbox. Receivers also weigh complaints, content and sending habits. Authentication shows who you are, and it helps, but it is only one signal among several.

A quick checklist for setting up SPF, DKIM and DMARC

  1. List every service that sends mail as your domain.
  2. Publish one SPF record that includes each of them.
  3. Turn on DKIM signing for each service and publish its record.
  4. Publish a DMARC record with the policy none and a reporting address.
  5. Read the reports and fix senders that fail.
  6. Move to quarantine, then reject, only when real mail passes.

DNS and Email Checker: Enter your domain and see its SPF, DKIM and DMARC records read back in plain words.

How we know

How the numbers were worked out. The worked examples use made-up round numbers, calculated with plain arithmetic. Replace them with your own figures; prices, rates and speeds change.

Sources

Published by OneClickAnswers.

You might also wonder...

Try it yourself

  • DNS and Email CheckerCheck a domain's mail, SPF, DMARC and address records in plain English.
  • SPF CheckerRead an SPF record in plain English and count its DNS lookups against the limit of 10.
  • DKIM CheckerLook up a domain's DKIM key at a selector and see its type and size.
  • DMARC CheckerRead a DMARC record tag by tag in plain English.

← All articles

Got another question?

Free, no account. Answers show how they were worked out.