In short
SPF, DKIM, and DMARC are three DNS records that prevent unauthorized parties from sending emails while impersonating your domain. SPF lists the servers authorized to send on your behalf, DKIM signs your messages, and DMARC tells recipients what to do with a message that fails these checks (let it through, mark it as spam, or reject it). Without DMARC set to “quarantine” or “reject” mode, your domain can be used for fraud. Google and Yahoo have required DMARC from high-volume senders since 2024.
Why It’s Important
The email sending protocol (SMTP) does not verify the sender’s identity: anyone can write “From: comptabilite@votre-entreprise.fr.” This is the basis for supplier impersonation scams, fake wire transfer scams, and targeted phishing. SPF, DKIM, and DMARC allow your recipients’ servers to verify that a message truly comes from you.
They also improve deliverability: email providers are filtering out misconfigured domains more strictly than ever.
The three mechanisms
| SPF | DKIM | DMARC | |
|---|---|---|---|
| Role | List the servers authorized to send on behalf of the domain | Sign each message with a private key | Set the policy for when a message fails and request reports |
| Where | TXT record on the domain | Public key in TXT format on selector._domainkey | TXT record on _dmarc |
| Example | v=spf1 include:_spf.google.com -all | v=DKIM1; k=rsa; p=MIIB… | v=DMARC1; p=reject; rua=mailto:dmarc@… |
| Standard | RFC 7208 | RFC 6376 | RFC 7489 |
DMARC also verifies alignment: the domain validated by SPF or DKIM must match the one displayed in the “From” field. This prevents a fraudster from using their own valid SPF domain while displaying yours.
Step-by-Step Setup
- Inventory: Make a list of everything that sends emails using your domain (email client, CRM, email marketing tool, billing system, website).
- SPF: a single record that includes all these services, ending with -all (or ~all while it’s being validated). Be mindful of the 10-lookup DNS limit.
- DKIM: Enable signing in each email service and publish the provided public keys.
- DMARC in observation mode: p=none with a reporting address (rua) to see who is sending on your behalf.
- Fix any legitimate sources that fail, then switch to `p=quarantine`, and finally to `p=reject`.
- Domains that do not send emails: Set SPF to “v=spf1 -all” and DMARC to “p=reject” so they cannot be used as decoys.
The Most Common Errors
- Multiple SPF records on the same domain: verification fails.
- More than 10 DNS lookups in the SPF record: “permerror” error.
- If DMARC is left set to `p=none` for years, there is no real protection.
- A forgotten mailing tool (newsletter, billing software) whose messages end up in the spam folder after being marked for rejection.
Our free testing tool checks these three records and indicates whether your domain is vulnerable to spoofing.
Frequently asked questions
Is DMARC mandatory?
It is not generally required by law, but Google and Yahoo have required it since February 2024 for senders of more than 5,000 messages per day, and it is recommended by ANSSI.
What is the difference between p=quarantine and p=reject?
With “quarantine,” messages that fail are sent to the spam folder; with “reject,” they are blocked. “Reject” provides the most comprehensive protection.
How do I verify my domain?
With our free SPF, DKIM, and DMARC test: it reads your DNS records and tells you in seconds whether an unauthorized party can send emails on your behalf.
Sources
Find out where an attacker would get in.
Our AI agents actually attack your scope, fully automated, and hand you the proof of every vulnerability.
