Cronzy Watch

Guide · 5 min read

SPF, DKIM and DMARC: what to set, and in what order

Anyone can put your domain in the From line of an e-mail. SPF, DKIM and DMARC are three DNS records that let receivers tell your mail from forgeries. Set them in this order and you can tighten safely.

Updated

In short

  • Publish exactly one SPF record per domain, and end it with -all once you know every sender.
  • Turn on DKIM signing in every service that sends mail for you.
  • Publish DMARC at p=none with a report address first, then move to quarantine and reject.
  • Use the free [domain checker](/tools/email-domain-checker/) to see what a domain publishes today.

What each record does

SPF, DKIM and DMARC compared
SPFDKIMDMARC
Question it answersIs this server allowed to send for the domain?Was this message signed by the domain, and unchanged?What should receivers do when the others fail, and who gets reports?
Where it livesA TXT record on the domainA TXT record at selector._domainkey.domainA TXT record at _dmarc.domain
Who sets it upYou list your sendersEach sending service gives you a key to publishYou choose a policy and a report address
Common mistakeTwo records, or more than 10 lookupsSigning turned on in one service but not the othersStaying on p=none for ever

The order to do it in

  1. List every service that sends mail as your domain: your mail platform, the website, the CRM, the newsletter tool, the ticketing system, the printers.
  2. Publish one SPF record that includes them all. Start with ~all if you are not sure you have found every sender.
  3. Turn on DKIM in each service and publish the keys it gives you.
  4. Publish DMARC at p=none with a rua= address. Read the reports for a few weeks to find senders you missed.
  5. Move to p=quarantine, then p=reject, when the reports show only your own senders failing nothing. Change SPF to -all at the same time.

Mistakes that break it

  • More than one SPF record. Receivers treat this as an error. Merge them into one.
  • More than 10 DNS lookups. Every include, a, mx, ptr, exists and redirect counts, also inside included records. Over the limit, SPF returns an error.
  • +all at the end of SPF. It allows every server on the Internet.
  • A new sending service added later without updating SPF and DKIM. DMARC at reject then blocks your own mail.
  • Parked domains with no mail policy. A domain that never sends mail should say so: SPF v=spf1 -all and DMARC p=reject.

Check what you publish

The free e-mail domain checker reads the three records for a domain and explains what to change. It cannot expand SPF includes or tell you whether your mail is delivered, so test with a real message too.

Where Cronzy Watch fits

Cronzy Watch includes e-mail-domain and TLS checks in its internet exposure view, per client, next to the exposed services it finds. The free checker above looks at one domain at a time.

Questions

Frequently asked questions

Do I need all three?

DMARC needs SPF or DKIM to pass in line with the visible From address, so in practice you want both SPF and DKIM, then DMARC to say what happens when they fail.

Will p=reject block my own mail?

It can, if a service sends as your domain without passing SPF or DKIM. That is what the p=none period and its reports are for.

Terms in this guide

See it on a demo estate

Tell us about your environment and we will show Cronzy Watch with data that matches it.

Request a demo