In brief
DMARC is configured last, after SPF and DKIM: first you list every system that sends email from your domain, then you give each one SPF coverage and a DKIM signature, and finally you publish a DMARC record with `p=none` and a report address. After a few weeks of reading reports and fixing gaps you move to `p=quarantine`, then to `p=reject`. Only then do receiving servers reject messages that impersonate your domain.
Three records, three questions
Each mechanism answers a different question that the receiving server asks when it accepts a message:
| Mechanism | Question the receiving server asks | Where it lives | Weakness on its own |
|---|---|---|---|
| SPF (RFC 7208) | is this server allowed to send mail for the envelope domain | a TXT record on the domain | it checks the envelope address, not the "From" address a person sees |
| DKIM (RFC 6376) | were the body and headers signed by a domain that holds the key | a public key in a TXT record under a selector | the signature can belong to a completely different domain than "From" |
| DMARC (RFC 9989) | does the "From" domain match the SPF or DKIM domain, and what to do if not | a TXT record under `_dmarc` | without SPF and DKIM there is nothing to check |
The key idea in DMARC is alignment. A fraudster can pass SPF for their own domain while putting yours in the "From" field. DMARC catches this because it requires the domain from SPF or from the DKIM signature to match the domain the recipient sees.
Step 1: list every sender
The most common mistake in a DMARC rollout is a forgotten system. A `p=reject` policy set too early will block invoices from the ERP or notifications from the online store. Before you touch DNS, list everything that sends email with an address in your domain:
- the mail server or cloud mail service your staff use,
- the ERP and accounting system (invoices, payment reminders, balance confirmations),
- the CRM and the newsletter tool,
- the ticketing system and helpdesk,
- the online store, the recruitment platform, the e-signature service,
- devices: scanners and printers that email files, and server monitoring.
For each sender, record the owner inside the company, the sending address and whether the provider can sign DKIM with your domain. The list will also help every time you change a provider.
Step 2: SPF and DKIM for each sender
Example records for `firma.pl`, which sends mail from a cloud mail service and a newsletter tool:
firma.pl. TXT "v=spf1 include:spf.dostawca-poczty.example include:mail.newsletter.example -all"
s1._domainkey.firma.pl. TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqh..."
_dmarc.firma.pl. TXT "v=DMARC1; p=none; rua=mailto:dmarc-raporty@firma.pl"For SPF, watch three things:
- One SPF record per domain. Two records starting with `v=spf1` cause an error and SPF stops working.
- The ten DNS lookup limit. RFC 7208 limits the mechanisms that trigger DNS queries (including `include`, `a`, `mx` and `redirect`) to ten. Each provider's `include` can contain more of them. Once you exceed the limit the result is an error, not a pass.
- The ending. `-all` says no other servers are authorized. `~all` is the softer option for a transition period.
For DKIM, give each sender its own selector (for example `s1` for mail and `nl1` for the newsletter), so you can rotate or revoke one provider's key without touching the others. RFC 8301 requires RSA keys of at least 1024 bits and recommends 2048. Rotate keys on a schedule, for example when you change providers or once a year.
Step 3: DMARC from monitoring to rejection
DMARC is rolled out in stages. Each stage lasts as long as it takes for the reports to stop showing legitimate mail that fails the checks.
| Stage | Record | What receivers do | What you do |
|---|---|---|---|
| 1. Monitoring | `p=none` with an `rua` address | deliver mail as before and send aggregate reports | read reports, add missing senders, enable DKIM |
| 2. Quarantine | `p=quarantine` | failing messages go to spam | follow up on reports of missing emails |
| 3. Reject | `p=reject` | failing messages are rejected | make sure every new system goes through the sender list |
Aggregate reports (defined in RFC 9990) arrive as XML files, usually once a day from each large mailbox provider. They show which IP addresses sent mail with your domain and whether it passed SPF, DKIM and alignment. At a few thousand messages a day you need a tool that collects and groups them.
In May 2026 the IETF published RFC 9989, which replaces RFC 7489 and moves DMARC onto the standards track. For a domain owner the main changes are these: the `pct` tag (the percentage of messages covered by the policy) is removed and replaced by a test mode, `t=y`, in which receivers apply a policy one step softer. A new `np` tag sets the policy for subdomains that do not exist. Existing records keep working.
What DMARC will not fix
DMARC protects exactly your domain. It will not stop:
- lookalike domains, such as `flrma.pl` instead of `firma.pl`; monitoring registrations of similar domains and tagging external mail in the mail client help here,
- messages from a compromised mailbox at a supplier, because such mail passes the supplier's SPF, DKIM and DMARC; this scenario is covered in Bank account change fraud,
- forwarded mail, which sometimes loses SPF alignment; this is why every sender should have DKIM, because the signature survives forwarding.
Domains the company does not send mail from (old brands, spare domains) are worth protecting too: a `v=spf1 -all` record and DMARC with `p=reject`. It takes minutes, and a fraudster loses a ready-made domain.
Large mailbox providers now require these mechanisms themselves. Google's sender guidelines require SPF or DKIM from every sender, and from senders of more than 5,000 messages a day to Gmail accounts they also require DMARC and alignment of the "From" domain with SPF or DKIM. A company without DMARC therefore risks not only impersonation but also its invoices landing in spam.
How to check that it works
After each change, send a message from every system on the list to a test mailbox and look at the `Authentication-Results` header. It should show `spf=pass`, `dkim=pass` and `dmarc=pass` for your domain. Then check the records with a tool that counts SPF lookups and detects duplicate records.
Mail configuration is also a standard item in infrastructure security tests and in the social engineering tests described in Phishing simulation and social engineering tests. Settings for the company's cloud mail, including filters and forwarding rules, are covered in Microsoft 365 security. If you want someone outside the company to check your domain configuration together with the rest of your infrastructure, B2Bnetwork engineers do this as part of Security testing.
Questions and answers
How long does it take to get DMARC to p=reject?
It depends on how many systems send email. A company with one mail service and a newsletter can go through the stages in a few weeks. A company with a dozen systems (ERP, CRM, helpdesk, stores) usually needs a few months, because each provider has to enable DKIM signing with your domain. Finding forgotten senders in the reports takes the most time.
Does p=none protect against impersonation?
No. A `p=none` policy is monitoring mode: receivers send reports but deliver messages as before. Protection starts with `p=quarantine` and `p=reject`. A `p=none` record left in place for years gives a false sense of security, so write down a date for moving to the next stage.
What should you do when the SPF ten lookup limit is exceeded?
First remove providers the company no longer uses. Then move some senders to subdomains, for example the newsletter to `news.firma.pl` with its own SPF record. For senders that sign DKIM with your domain, DKIM provides DMARC alignment, so they do not always have to be in the main domain's SPF record.
Do DMARC reports contain personal data?
Aggregate reports contain server IP addresses, domains and message counts, with no content. Failure reports (`ruf`) can contain parts of headers, including email addresses, which is why many companies do not enable them. If an external service processes the reports, check the contract and where the data is processed.
Sources
- RFC 7208, Sender Policy Framework (SPF)
- RFC 6376, DomainKeys Identified Mail (DKIM) Signatures
- RFC 8301, Cryptographic Algorithm and Key Usage Update to DKIM
- RFC 9989, Domain-based Message Authentication, Reporting, and Conformance (DMARC)
- RFC 9990, Domain-Based Message Authentication, Reporting, and Conformance (DMARC) Aggregate Reporting
- Google, Email sender guidelines