SPF, DKIM and DMARC, explained
Three DNS records decide whether mail claiming to come from your domain is delivered, filed as spam, or rejected outright. They are published as TXT records, they are easy to get subtly wrong, and nothing tells you when they break.
SPF lists which servers are allowed to send mail for your domain. DKIM signs each message with a key published in your DNS, so a receiver can verify the message was not altered and really came from your domain. DMARC ties the two together: it tells receivers what to do when a message fails both checks, and where to send reports. All three are published as TXT records in your zone, and all three fail silently, because a broken policy does not bounce your mail back to you.
SPF
Sender Policy Framework: a TXT record listing the servers permitted to send mail for your domain, ending in a rule for everything else.
SPF is checked against the envelope sender, not the visible From address, which is why it alone cannot stop a convincing forgery. It also breaks when mail is forwarded, because the forwarding server is not on your list. Two live SPF records at one name is a hard failure rather than a merge: receivers treat the result as permanently erroneous and apply neither. The record also has a hard limit of ten DNS lookups, and stacking several providers' include statements quietly exceeds it.
Related terms DKIM DMARC TXT record SPF 10-lookup limit
Monitor it Email authentication monitoring
SPF 10-lookup limit
A hard cap in the SPF specification: evaluating your record may cost a receiver at most ten DNS lookups. Exceed it and the result is permerror, which counts as a failure.
This is the commonest way a correct-looking SPF record stops working, and it happens by accumulation rather than by mistake. Every include, a, mx, ptr and redirect costs one lookup, and each included record's own includes count too, so adding a fourth sending platform can push a record over a limit it was comfortably inside last year. Nothing warns you: mail keeps sending, receivers keep evaluating, and the verdict quietly becomes an error that DMARC then treats as a fail. The fixes are to drop providers you no longer send through, replace an include with the ip4 and ip6 ranges it resolves to where the provider publishes stable ones, or put the record through a flattening service and accept the maintenance that comes with it.
Related terms SPF TXT record DMARC policy (p=none, quarantine, reject)
Monitor it Email authentication monitoring
DKIM
DomainKeys Identified Mail: a cryptographic signature added to each outgoing message, verified against a public key published in your DNS under a selector name.
DKIM survives forwarding, which is exactly where SPF fails, so the two are complements rather than alternatives. Each sending platform publishes its own key under its own selector, so a domain sending through several services carries several DKIM records. The usual failure is silent: a key rotated at the provider and never updated in the zone leaves every message failing verification while sending continues normally.
Related terms SPF DMARC TXT record DKIM selector
Monitor it Email authentication monitoring
DKIM selector
The label that names one DKIM key in your zone. It is published in the message header and points at a TXT record at selector._domainkey.yourdomain.
The selector is why DKIM cannot be checked the way SPF and DMARC can: those records sit at a name you can guess, and a DKIM key does not. You either read the selector out of a message header or you already know what your provider uses. It also explains how one domain signs for several platforms at once, since each provider publishes its own key under its own selector and they never collide. Rotating a key means publishing a new selector, switching the sending platform to it, and leaving the old record in place until no mail signed with the old key is still in flight.
Related terms DKIM TXT record DNS propagation
Monitor it Email authentication monitoring
DMARC
Domain-based Message Authentication, Reporting and Conformance: a TXT record at _dmarc that tells receivers what to do with mail failing SPF and DKIM, and where to send reports.
DMARC is what turns the other two records into enforcement, and it is the one that requires the visible From address to match, which is what actually stops look-alike forgeries. Its policy runs from none, which only reports, through quarantine to reject. Publishing none is a real and useful first step: you see who is sending as you before you risk blocking anything. Two DMARC records at _dmarc is a total failure, not a conflict to be resolved, because receivers are required to apply no policy at all when they find more than one.
Related terms SPF DKIM MX record DMARC policy (p=none, quarantine, reject)
Monitor it Email authentication monitoring
DMARC policy (p=none, quarantine, reject)
The p= value in a DMARC record: what you are asking receivers to do with mail that claims to be from your domain and passes neither an aligned SPF check nor an aligned DKIM signature.
There are three answers and they are a ladder, not a preference. p=none enforces nothing and only asks for reports, which is where every domain should start, because the reports show you the sending sources you had forgotten. p=quarantine asks receivers to file failures as spam. p=reject asks them to refuse the message outright, and is the only value that actually stops someone sending as you. The reason most domains stall at none is that moving up without reading the reports first blocks your own mail: a marketing platform nobody told you about fails alignment and disappears. Note that a policy applies to alignment failures, so a message can pass SPF at the envelope level and still be rejected because the visible From address belongs to your domain and the passing check did not.
Monitor it Email authentication monitoring
SPF softfail vs fail (~all vs -all)
The two ways an SPF record can end. ~all (softfail) says mail from unlisted servers is probably not legitimate; -all (fail) says it definitely is not.
The ending only decides what SPF itself reports for a server you did not list. Under DMARC, softfail and fail are treated the same way, as an SPF result that did not pass, and it is the DMARC policy that decides whether the message is delivered, filed as spam or rejected. Without DMARC, receivers apply their own judgement, and -all gives them a stronger reason to reject. ~all is the safer ending while you are still finding every service that sends as you; -all is the stricter one once the list is complete. ?all (neutral) and +all (allow everyone) protect nothing.
Related terms SPF DMARC policy (p=none, quarantine, reject) SPF 10-lookup limit
Monitor it Email authentication monitoring
DMARC reports (rua and ruf)
The reports mailbox providers send back to the addresses in a DMARC record: aggregate reports (rua), a daily XML summary, and failure reports (ruf), copies of individual failing messages.
Aggregate reports are how you learn who sends mail as your domain. Each one lists the sending IP addresses a receiver saw, how many messages each sent, and whether SPF and DKIM passed and aligned. Read before raising a policy, they reveal the forgotten services that would otherwise be blocked. They arrive as compressed XML, so most people send them to a parser rather than a person. Failure reports are rarer: many large providers do not send them at all for privacy reasons. To deliver reports to a mailbox on another domain, that domain must publish a record authorising it.
Related terms DMARC DMARC policy (p=none, quarantine, reject) SPF DKIM
Monitor it Email authentication monitoring
MTA-STS
A standard that lets a domain require sending mail servers to deliver to it over an encrypted, certificate-checked connection.
Mail between servers is encrypted only opportunistically by default, so an attacker in the path can strip the encryption and the sender falls back to plain text. MTA-STS closes that gap: a TXT record at _mta-sts announces a policy, and a file served over HTTPS at mta-sts.yourdomain lists your MX hosts and a mode. In enforce mode, senders that support it refuse to deliver unless the connection is encrypted and the MX certificate is valid for its name. Start in testing mode with TLS reporting turned on, because an expired or mismatched certificate on an MX host stops mail outright once you enforce.
Related terms MX record TXT record ERR_CERT_COMMON_NAME_INVALID (name mismatch)
BIMI
Brand Indicators for Message Identification: a DNS record that tells mailbox providers which logo to show beside your messages.
BIMI is the reward for strict email authentication. It only works when the domain's DMARC policy is quarantine or reject, because a logo on unauthenticated mail would help spoofers. The record is a TXT at default._bimi pointing to the logo in SVG Tiny PS format, and most large providers, Gmail among them, also require a Verified Mark Certificate or Common Mark Certificate proving the right to use the logo before they display it.
Related terms DMARC policy (p=none, quarantine, reject) DMARC TXT record