---
title: "DMARC, SPF and DKIM setup: how to stop criminals spoofing your email domain"
description: "SPF, DKIM and DMARC explained simply: sample DNS records, a staged path to p=reject, common pitfalls, and what Gmail, Yahoo and Outlook.com now require."
url: https://krakenshield.eu/knowledge/blog/dmarc-spf-dkim-setup/
lang: en
updated: 2026-10-08
publisher: KrakenShield (KRAKEN HOLDING SAS)
overview: https://krakenshield.eu/llms.txt
---
# DMARC, SPF and DKIM setup: how to stop criminals spoofing your email domain
> SPF, DKIM and DMARC explained simply: sample DNS records, a staged path to p=reject, common pitfalls, and what Gmail, Yahoo and Outlook.com now require.

Guide Published 8 October 2026

Anyone can send an email that shows your address as the sender. SPF, DKIM and DMARC let mailbox providers unmask those fakes: here is how to set them up step by step without blocking your own mail.

By **The KrakenShield team** 8 min read

Email was designed at a time when everyone trusted everyone: nothing stops a stranger from typing `accounts@your-company.com` into the “From” field. That is the basis of many [phishing](https://krakenshield.eu/knowledge/glossary/phishing/) campaigns and of fake supplier or [CEO fraud](https://krakenshield.eu/knowledge/glossary/ceo-fraud/): your customers receive a message that seems to come from you, with new bank details or a booby-trapped link.

Three DNS records, SPF, DKIM and DMARC, let mailbox providers check that an email really comes from you and reject the rest. They cost nothing, yet they are still poorly applied.

66%

*of the websites of France’s 100 largest cities do not enforce DMARC (no record or p=none), passive measurement on 6 October 2026*

Source: KrakenShield Barometer 2026

That figure, from our [barometer of France’s 100 largest cities](https://krakenshield.eu/barometer/cities-2026/), shows that even large organisations leave their name open to any fraudster.

## Why fraudsters want your domain name

A spoofed email works because it borrows the trust your customers, suppliers and staff place in you. The fraudster does not need to hack your mailbox: it is enough that nobody on the receiving end can check the sender.

> **Nestor Former hacker turned defender:** When I prepare an authorised phishing exercise, the first thing I look at is the client’s DMARC. If there is none, a fraudster can write to its customers in its name and nobody will stop them: an “updated” invoice sent on a Friday evening, and the transfer goes out.

The damage goes beyond the fraud itself: defrauded customers turning against you, a tarnished reputation, and your genuine emails landing in spam because your domain was used for junk.

## SPF, DKIM, DMARC: three mechanisms, one goal

### SPF: the list of authorised senders

SPF (Sender Policy Framework, RFC 7208) is a TXT record published on your domain. It lists the servers allowed to send email for you: your mail service, your newsletter tool, your invoicing software. The receiving server compares the sender’s IP address with that list.

An important limit: SPF checks the technical return address (the envelope, “MAIL FROM”), not the address the reader sees. On its own, it does not stop the displayed address being spoofed.

### DKIM: a signature on every message

DKIM (DomainKeys Identified Mail, RFC 6376) adds a [digital signature](https://krakenshield.eu/knowledge/glossary/digital-signature/) to every email. Your server signs with a private key; the matching public key is published in your DNS under a name called a selector. The receiver checks that the message has not been altered and that it was signed by the domain it claims. Google recommends 2,048-bit keys (1,024 bits at the very least).

DKIM’s advantage: the signature survives forwarding through an intermediary (mailing list, redirect), where SPF often fails.

### DMARC: the rules of the game, and the reports

DMARC, whose standard was updated in May 2026 (RFC 9989, replacing RFC 7489), does three things:

1. it requires SPF or DKIM to pass **with a domain aligned** to the visible “From” address;
2. it tells the receiver what to do with failing messages: `none` (no special treatment), `quarantine` (spam folder) or `reject` ;
3. it has the providers that receive email in your name send you reports.

### Alignment, the idea that changes everything

A fraudster can easily make SPF pass with their own technical domain while displaying yours in the “From” field. Alignment closes that door: DMARC only passes if the domain validated by SPF or DKIM matches the visible address.

In relaxed mode (the default), `billing.example.com` is aligned with `example.com`. In strict mode (`adkim=s`, `aspf=s`), the match must be exact.

## What Gmail, Yahoo and Outlook.com require

The big mailbox providers have turned these good practices into delivery conditions:

| Provider | Since | Who | Main requirements |
| --- | --- | --- | --- |
| Gmail | 1 February 2024 | All senders | SPF or DKIM, spam rate below 0.3% |
| Gmail | 1 February 2024 | More than 5,000 messages a day to Gmail | SPF, DKIM and DMARC (p=none accepted), alignment, one-click unsubscribe |
| Yahoo | February 2024 | Bulk senders | SPF and DKIM, DMARC at least p=none, alignment, one-click unsubscribe |
| Outlook.com, Hotmail, Live | 5 May 2025 | 5,000 or more messages to these consumer services | SPF and DKIM, aligned DMARC at least p=none; otherwise rejection (error 550 5.7.515) |

These rules mostly target large senders, and they accept `p=none`. They improve your deliverability but do not protect your domain on their own: for that, you need to go to `quarantine` or `reject`.

## Sample DNS records

Here are examples for the fictitious domain `example.com`, to adapt to your own services:

| Mechanism | DNS name (TXT) | Sample value | Purpose |
| --- | --- | --- | --- |
| SPF | `example.com` | `v=spf1 include:_spf.mailprovider.example ip4:203.0.113.10 -all` | Authorises your mail service and one server, refuses the rest |
| DKIM | `s1._domainkey.example.com` | `v=DKIM1; k=rsa; p=MIIBIjANBg…` | Public key supplied by your sending service |
| DMARC (monitoring) | `_dmarc.example.com` | `v=DMARC1; p=none; rua=mailto:dmarc@example.com` | Blocks nothing, sends reports |
| DMARC (protection) | `_dmarc.example.com` | `v=DMARC1; p=reject; sp=reject; rua=mailto:dmarc@example.com` | Rejects fakes, subdomains included |

For a domain that **never** sends email (an old name, a brand domain), lock it down completely:

```
example.net. TXT "v=spf1 -all" _dmarc.example.net. TXT "v=DMARC1; p=reject; sp=reject; rua=mailto:dmarc@example.com"
```

> **Dormant domains too**
> Dormant domains too
> 
> Fraudsters love domains you own but do not use: nobody watches what goes out in their name. Two DNS lines are enough to make them useless.

## Rolling out DMARC without blocking your own mail

Jumping straight to `p=reject` is the surest way to make your invoices or newsletter vanish. The right method is gradual.

**Step 1: inventory.** List everything that sends email in your name: mail service, website forms, newsletter, CRM, invoicing or payroll software, helpdesk, printers and copiers that email scans.

**Step 2: SPF and DKIM everywhere.** Add each service to your SPF record and enable DKIM with your domain (any serious provider supplies the records to publish).

**Step 3: DMARC in monitoring mode.** Publish `p=none` with a `rua` address. Mailbox providers will send you aggregate reports, usually daily, in XML: which IP addresses sent email in your name, how many messages, and with what SPF, DKIM and DMARC results. These files are unreadable by eye, so use a DMARC report analyser. If the `rua` address belongs to another domain (a provider’s), that domain must authorise it in its DNS; your provider usually takes care of this.

**Step 4: fix.** For each legitimate source that fails, fix SPF or DKIM. Whatever still fails and you do not recognise is spoofing: proof that the protection is worth it.

**Step 5: quarantine, then reject.** Once the reports have shown no failing legitimate mail for several weeks, move to `p=quarantine`, watch again, then move to `p=reject`.

> **The pct tag is gone**
> The pct tag is gone
> 
> Many guides still suggest `pct=` to apply the policy to a share of messages. The May 2026 standard (RFC 9989) removed it because it was poorly implemented, and offers a test mode, `t=y`, instead. The safest path is still to tighten in stages, guided by the reports.

> **Belinda PhD in cryptography:** p=none is an alarm wired up without a siren: useful to know what is going on, useless for stopping anyone. Set yourself a date to move to reject, or you will stay in monitoring mode forever.

## Common pitfalls

- **Two SPF records.** When adding a service, people often create a second `v=spf1` TXT record. The standard then requires a permanent error: SPF fails for all your messages. Merge everything into one record.
- **More than 10 DNS lookups.** SPF caps at 10 the mechanisms that trigger a DNS query (`include` , `a` , `mx` , `ptr` , `exists` , `redirect` ), including those inside nested `include` s. Beyond that: permanent error. Remove abandoned services, replace what you can with `ip4` or `ip6` , or give your newsletter its own subdomain.
- **Forgotten subdomains.** Without `sp=` , your subdomains follow the `p` policy. A subdomain that sends mail (for instance `news.example.com` ) needs its own SPF and DKIM signature. The 2026 standard also adds `np=` for subdomains that do not exist, a favourite of fraudsters.
- **Forgotten sending services.** Newsletter, CRM, invoicing, recruitment, ticketing: any tool that sends with your address without aligned DKIM will be blocked as soon as you reach `quarantine` . DMARC reports exist precisely to flush them out.
- **An over-permissive SPF.** `+all` lets the whole planet send for you: never use it.

> **What DMARC does not do**
> What DMARC does not do
> 
> DMARC protects your exact domain. It does not stop a fraudster from buying a lookalike domain (`example-invoices.com`) or showing only your name in front of another address. Staff vigilance remains essential: the chapter [Phishing and social engineering](https://krakenshield.eu/knowledge/a-to-z/04-phishing-social-engineering/) explains how to spot these fakes.

## Checking your set-up

A checklist to run every quarter, and whenever you add a sending service:

- A single `v=spf1` TXT record on the domain, ending in `-all` or `~all` .
- Fewer than 10 DNS lookups in SPF, nested `include` s included.
- DKIM active for every sending service, signed with your domain, 2,048-bit key where possible.
- A `_dmarc` record with a `rua` address that actually receives reports.
- A `quarantine` or `reject` policy, with a target date if you are still on `p=none` .
- Dormant domains locked down (`v=spf1 -all` and `p=reject` ).
- A real test: send an email to a Gmail or Outlook.com mailbox and view the original; the lines `spf=pass` , `dkim=pass` and `dmarc=pass` should appear.

For an outside view, [KrakenShield’s privacy audit](https://krakenshield.eu/website-security-check/) checks, among other things, whether your SPF and DMARC records exist and what policy they apply, with the fixes to make.

Your [attack surface](https://krakenshield.eu/knowledge/glossary/attack-surface/) is not limited to your servers: your domain name is part of it. A few well-placed DNS lines are enough to stop it being used as a weapon against your own customers.

> **Belinda PhD in cryptography:** The day your DMARC reports show hundreds of rejected messages you never sent, you will know those few DNS lines are working for you.

## Key takeaways

1. SPF lists the servers allowed to send for your domain, DKIM signs your messages, and DMARC tells receivers what to do with fakes and sends you reports.
2. DMARC only passes when SPF or DKIM passes with a domain aligned to the visible From address: alignment is what stops spoofing.
3. A p=none policy protects nobody: it is an observation phase, to be moved on to quarantine and then reject using the rua reports.
4. Common pitfalls: two SPF records, more than 10 DNS lookups in SPF, forgotten subdomains, and undeclared sending services (newsletter, CRM, invoicing).
5. Gmail and Yahoo since February 2024, and Outlook.com since 5 May 2025, require SPF, DKIM and DMARC from high-volume senders.

## Frequently asked questions

**What is the difference between SPF, DKIM and DMARC?**

SPF publishes the list of servers allowed to send email for your domain. DKIM adds a signature to each message that can be checked against a key published in DNS. DMARC ties both to the visible sender address, tells the receiver what to do with failing messages (nothing, quarantine, reject) and sends you reports.

**Does a DMARC p=none policy protect my domain?**

No. With p=none you ask mailbox providers not to treat failing messages in any special way: you only receive reports. It is an essential step to find your legitimate senders, but only quarantine and reject actually stop a fake email reaching the inbox.

**Can a domain have two SPF records?**

No. The SPF standard (RFC 7208) says that a domain publishing more than one record starting with v=spf1 produces a permanent error, so SPF fails for all your messages. Merge every mechanism into a single record.

**Is DMARC mandatory?**

It is not a general legal obligation for businesses. In practice, Gmail, Yahoo and Outlook.com require SPF, DKIM and DMARC from high-volume senders, and ANSSI, the French national cybersecurity agency, recommends all three. Without them, your email risks the spam folder and your domain stays easy to spoof.

**How long does it take to reach DMARC p=reject?**

Usually a few weeks to a few months. It mainly depends on how many services send email in your name: you need to identify them through DMARC reports, set up SPF and DKIM for each one, then tighten the policy in stages.

## Sources

- [IETF, RFC 7208: Sender Policy Framework (SPF)](https://www.rfc-editor.org/rfc/rfc7208.html)
- [IETF, RFC 6376: DomainKeys Identified Mail (DKIM) Signatures](https://www.rfc-editor.org/rfc/rfc6376.html)
- [IETF, RFC 9989: DMARC (May 2026, obsoletes RFC 7489)](https://www.rfc-editor.org/rfc/rfc9989.html)
- [IETF, RFC 9990: DMARC aggregate reporting (May 2026)](https://www.rfc-editor.org/rfc/rfc9990.html)
- [Google, Email sender guidelines (Gmail)](https://support.google.com/a/answer/81126)
- [Yahoo, Sender Best Practices (February 2024 requirements)](https://senders.yahooinc.com/best-practices/)
- [Microsoft, Fix NDR error 550 5.7.515 in Outlook.com (high-volume senders)](https://support.microsoft.com/en-US/Outlook/fix-ndr-error-550-5-7-515-in-outlook-com)
- [Microsoft Tech Community, Outlook’s New Requirements for High-Volume Senders (2025)](https://techcommunity.microsoft.com/blog/microsoftdefenderforoffice365blog/strengthening-email-ecosystem-outlook%E2%80%99s-new-requirements-for-high%E2%80%90volume-senders/4399730)
- [ANSSI, Recommendations for connecting an information system to the internet (SPF, DKIM and DMARC, in French)](https://messervices.cyber.gouv.fr/guides/recommandations-relatives-linterconnexion-dun-si-internet)
- [KrakenShield, 2026 security barometer of the websites of France’s 100 largest cities](https://krakenshield.eu/barometer/cities-2026/)

[Go further**Phishing, social engineering and physical intrusion** Cyber A to Z, chapter 4](https://krakenshield.eu/knowledge/a-to-z/04-phishing-social-engineering/) [All articles](https://krakenshield.eu/knowledge/blog/)

## More from the blog

[News **A cybersecurity Advent calendar, a gift from KrakenShield**](https://krakenshield.eu/knowledge/blog/cybersecurity-advent-calendar-2026/) [News **Holiday season scams targeting businesses: Black Friday, parcels, fake suppliers and gift cards**](https://krakenshield.eu/knowledge/blog/holiday-season-scams-business/) [Guide **US or European cybersecurity tools: sovereignty, GDPR and NIS2**](https://krakenshield.eu/knowledge/blog/european-cybersecurity-tools-sovereignty-gdpr/)
