Why e-mail spoofing still works
The protocol that carries e-mail (SMTP) was designed without any check of who the sender really is. Anyone can send a message with your address in the From field, from any server in the world. That is why invoice fraud, fake payment instructions and phishing in the name of a supplier or a managing director still work so well.
Three DNS records close this gap. SPF says which servers may send mail for your domain, DKIM adds a cryptographic signature to each message, and DMARC tells receivers what to do when a message fails both checks and sends you reports about it. None of them is useful on its own: real protection only comes when all three work together and DMARC is at enforcement.
The checker above reads these records from public DNS and shows, for each one, whether it is in order and which record to publish next.
SPF: which servers may send for you
SPF (RFC 7208) is a TXT record at the root of the domain, for example v=spf1 include:spf.protection.outlook.com -all. The receiving server checks whether the sending IP address is on the list. Three rules cause most problems:
- Exactly one record. Two records starting with
v=spf1do not add up; they produce a permanent error (permerror) and SPF fails for all mail. When you add a new service, extend the existing record instead of creating a second one. - No more than 10 DNS lookups. Every
include,a,mx,existsandredirect, including those nested inside included records, counts towards a limit of 10. A few marketing and CRM services can exceed it quickly. The checker estimates the count by following the includes. - A sensible ending.
-all(reject unlisted senders) and~all(mark them as suspicious) are both fine when DMARC is in place.?allgives no protection and+allallows the whole internet to send in your name.
SPF has one weakness: it checks the technical envelope sender, not the From address the recipient sees, and it breaks when a message is forwarded. That is why it needs DKIM and DMARC.
DKIM: a signature that survives forwarding
With DKIM (RFC 6376) the sending server signs each message with a private key, and the receiver verifies the signature with the public key published in DNS at <selector>._domainkey.yourdomain. The signature also survives most forwarding, so DKIM is usually the more reliable basis for DMARC.
The selector is a free-form name chosen by the provider. Microsoft 365 uses selector1 and selector2, published as CNAME records pointing to Microsoft. Google Workspace uses google by default. Newsletter and CRM platforms each have their own. Because selectors cannot be listed from DNS, a checker can only probe common names. If it finds nothing, look at the DKIM-Signature header of a message you sent: the s= tag is your selector, and you can enter it in the tool.
Use 2048-bit RSA keys where your provider allows it. Google recommends 2048 bits in its sender guidelines, and Microsoft 365 lets you move from 1024 to 2048 bits at the next key rotation.
DMARC: the policy that ties it together
DMARC is a TXT record at _dmarc.yourdomain. A message passes DMARC when SPF or DKIM passes and the domain they verify matches (is aligned with) the domain in the visible From address. The record also states a policy for messages that fail:
| Policy | What receivers do | When to use it |
|---|---|---|
p=none | Deliver normally, send reports | The first two to four weeks, to find all legitimate senders |
p=quarantine | Put failing mail in spam | When the reports show your own mail passes |
p=reject | Refuse failing mail | The target state for every domain |
The rua tag sets the address for aggregate reports, XML files in which receivers list which servers sent mail in your name and whether it passed. Without them you are working blind, so always start with p=none and a rua address, for example v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain. A DMARC report service makes the XML readable.
In May 2026 the IETF published RFC 9989, which replaces the original DMARC specification RFC 7489. Existing v=DMARC1 records keep working. The most visible changes are that the pct tag has been removed and replaced by a test flag t=y, and that a new np tag sets the policy for non-existent subdomains.
What Gmail and Yahoo require
Since February 2024, Gmail has required every sender to set up SPF or DKIM. Senders of more than 5,000 messages a day to Gmail accounts must have both SPF and DKIM, a DMARC record (the policy can be none), a From domain aligned with SPF or DKIM, one-click unsubscribe for marketing mail and a spam rate below 0.3%. Yahoo sets practically the same rules for bulk senders. Even if you send less, these rules show where the market is heading: unauthenticated mail increasingly ends up in spam or is rejected.
Common mistakes we see
- Forgotten senders. The ERP sends invoices, the web shop sends order confirmations, the helpdesk sends tickets, and none of them is in SPF or signs with DKIM. They show up in the DMARC reports as soon as you start reading them.
- Staying at p=none for years. Monitoring is a phase, not protection. Plan the move to quarantine and reject with dates.
- Weak subdomain policy.
sp=nonenext top=rejectlets attackers send from invented subdomains. - Unprotected parked domains. Domains that send no mail need
v=spf1 -allandv=DMARC1; p=reject, otherwise they are ideal for spoofing. - Two SPF records after a provider change, and SPF records over the lookup limit.
A safe path to p=reject
- List every service that sends mail in your name.
- Publish one SPF record and enable DKIM for the main mail system and each service.
- Publish DMARC with
p=noneandrua, and read the reports for two to four weeks. - Fix the senders that fail alignment, then move to
p=quarantine. - When the reports stay clean, move to
p=rejectand keep monitoring.
Protecting your domain against spoofing is a sensible part of the cyber risk management measures that NIS2 requires. If you want to know whether the directive applies to you, see the guide NIS2 directive, and for a broader check of your defences the cyber-attack readiness assessment.
Humanfrog sets up and manages Microsoft 365 and e-mail security, including SPF, DKIM, DMARC reporting and the step-by-step move to p=reject without lost mail. To review your result with an expert, write to us.