# SPF, DKIM and DMARC: how they work, setup and a staged rollout

> SPF lists the servers allowed to send, DKIM signs each message and DMARC ties both to the From address. Record syntax, setup order and a staged rollout.

- URL: https://computese.com/spf-dkim-dmarc/
- Author: Kai Mai, Chief Technology Officer, Computese
- Published: 2026-11-14
- Updated: 2026-12-03
- Topics: IT support, Hosting

## In short
- SPF lists the servers allowed to send for a domain, DKIM signs each message with a key published in DNS, and DMARC passes a message only when SPF or DKIM passes for a domain that matches the visible From address.
- Publish one SPF record within 10 DNS lookups, sign with 2048-bit DKIM keys under your own domain, and start DMARC at p=none with reports. Fix every legitimate sender that fails alignment before enforcing.
- Move from p=none to quarantine to reject at a pace set by who sends. Google suggests a week at p=none and RFC 9989 at least a month for domains heading to reject, and RFC 9989 advises domains whose users post to mailing lists not to publish reject.
- Gmail and Yahoo (from February 2024) and Outlook.com (from May 2025) expect SPF, DKIM and DMARC from bulk senders. Gmail also requires one-click unsubscribe on marketing mail and a spam rate under 0.3%.
- Forwarding usually breaks SPF and mailing lists often break DKIM signatures. ARC (RFC 8617) is Experimental, and RFC 9989 says no fix for lists is widely used, so read your aggregate reports before choosing reject.

SPF, DKIM and DMARC are three DNS-based checks that let a receiving mail server confirm a message really comes from the domain in its From address. SPF lists the servers allowed to send, DKIM signs each message, and DMARC requires one of them to match the visible From domain and sets what happens when none does.

This guide is for anyone who owns a domain and sends business email, and for the people who run it. It covers record syntax, setup order, a staged move from p=none to quarantine to reject, bulk-sender rules, forwarding and mailing lists, and troubleshooting. Everything is as of December 2026. In May 2026 the IETF published DMARC as [RFC 9989](https://www.rfc-editor.org/rfc/rfc9989.html), which obsoletes RFC 7489, so older advice about the `pct` tag is out of date.

## What do SPF, DKIM and DMARC each do?

Email was designed without proof of who sent a message, so anyone can type any From address. SPF, DKIM and DMARC add that proof in three places, each published as a DNS record that receivers look up.

**SPF**, the Sender Policy Framework ([RFC 7208](https://www.rfc-editor.org/rfc/rfc7208.html)), is a list in DNS of the servers allowed to send mail for a domain. The receiver checks the connecting server's IP address against the list for the domain of the envelope sender, also called the Return-Path address.

**DKIM**, DomainKeys Identified Mail ([RFC 6376](https://www.rfc-editor.org/rfc/rfc6376.html)), is a signature on the message. The sender signs chosen headers and a hash of the body with a private key, and the receiver checks it against the public key in DNS. A valid signature shows that the signing domain handled the message and that the signed parts did not change.

**DMARC**, Domain-based Message Authentication, Reporting, and Conformance, ties the two to the address people see. A message passes when SPF or DKIM passes for a domain that matches the From domain. The record also tells receivers what to do with failures and where to send reports.

|              | SPF                                        | DKIM                             | DMARC                                       |
| ------------ | ------------------------------------------ | -------------------------------- | ------------------------------------------- |
| Checks       | The server's IP address against a list     | A signature against a public key | That SPF or DKIM passed for the From domain |
| Domain used  | Envelope sender, or the HELO name if empty | The `d=` domain in the signature | The visible From domain                     |
| Published at | The domain itself                          | `selector._domainkey.domain`     | `_dmarc.domain`                             |

None of the three is enough alone. Any domain owner can publish an SPF record and any domain can sign a message, so both can pass for a name unrelated to the From address ([RFC 9989](https://www.rfc-editor.org/rfc/rfc9989.html)). Passing also does not mean the mail is wanted: spammers authenticate too, so [authentication alone does not guarantee delivery](https://support.google.com/mail/answer/180707?hl=en). Our [small business cybersecurity checklist](https://computese.com/cybersecurity-best-practices/) places it among the other basics.

## How do the three checks fit together, and what is alignment?

A message carries three domain names that can all differ. The From header domain is what the reader sees, and DMARC calls it the Author Domain. SPF checks the envelope sender domain, and DKIM verifies the signing domain in the `d=` tag.

DMARC passes when at least one of those checks passes and its domain matches the From domain. That match is alignment. Relaxed alignment, the default for both `adkim` and `aspf`, accepts any name under the same organizational domain. Strict alignment needs identical names.

![An envelope carries a tag. A shield and a key each send a domain tag to a gate. One tag matches the envelope's tag, joined by an orange bracket; the other, a different shape, is turned away.](https://computese.com/images/blog/spf-dkim-dmarc/alignment.f40b8bde4f-1536.webp)

*DMARC passes only when the domain that SPF or DKIM validated matches the one in the From line.*

| Domain SPF or DKIM validated | From domain        | Alignment                              |
| ---------------------------- | ------------------ | -------------------------------------- |
| `foo.example.com`            | `news.example.com` | Relaxed: same organizational domain    |
| `news.example.com`           | `news.example.com` | Strict: identical                      |
| `foo.example.net`            | `news.example.com` | None: different organizational domains |

A third-party sender shows why alignment matters. A newsletter or invoicing service sends your mail with its own bounce domain and its own signing key. SPF and DKIM both pass, for the vendor, and neither aligns with you, so DMARC fails. The fix is a key published under your domain, through a DKIM record or a CNAME record the service gives you, as the [Canadian Centre for Cyber Security](https://cyber.gc.ca/en/guidance/implementation-guidance-email-domain-protection) describes, or a bounce subdomain of yours.

A receiver records its verdict in an `Authentication-Results` header ([RFC 8601](https://www.rfc-editor.org/rfc/rfc8601.html)). This illustrative one shows that failure: both passes are for `vendor.example`, and DMARC fails for `example.com`.

```text
Authentication-Results: mx.receiver.example;
  spf=pass smtp.mailfrom=bounce.vendor.example;
  dkim=pass header.d=vendor.example header.s=s1;
  dmarc=fail (p=QUARANTINE) header.from=example.com
```

## How do you write an SPF record, and what is the 10-lookup limit?

An SPF record is one TXT record at the domain: `v=spf1`, the permitted senders as terms, and a default for everything else. This example uses a documentation address and a made-up service:

```text
example.com.  IN  TXT  "v=spf1 include:_spf.google.com include:mail.newsletter.example ip4:203.0.113.25 ~all"
```

The receiver reads the terms left to right and stops at the first match. A term can carry a qualifier: `+` pass (the default), `-` fail, `~` softfail or `?` neutral ([RFC 7208](https://www.rfc-editor.org/rfc/rfc7208.html)). Here `ip4:` allows an address, `include:` trusts another domain's record, and `all` matches everything else, so it goes last.

Two rules prevent most breakage:

- Publish one SPF record per name. If a query returns more than one, the result is a permanent error, `permerror`. Merge each new service into the existing record.
- For a domain that sends no mail, publish `v=spf1 -all`, which RFC 7208 calls a well-established best practice.

### Why does SPF fail with "too many DNS lookups"?

A check may follow at most 10 terms that cause DNS queries: `include`, `a`, `mx`, `ptr`, `exists` and `redirect`. The `ip4`, `ip6` and `all` terms are free. Nested records count, so an `include` whose own record holds three more includes costs four. Past 10 the result is `permerror`. RFC 7208 also says to limit void lookups, queries that return no record, to two, so stale `a` and `mx` terms cause the same error. Because receivers stop at the first match, a record over the limit can still pass for some senders, which makes the failure intermittent.

![A receiving server follows a chain of ten document cards. A solid orange bar stops the path after the tenth, and two dashed cards beyond it are never reached.](https://computese.com/images/blog/spf-dkim-dmarc/spf-lookups.93a99bab39-1536.webp)

*Past 10 DNS lookups a receiver stops reading, and SPF returns a permanent error.*

To get back under the limit, remove services you no longer use and move third-party senders to a subdomain, which has its own budget of 10. Swap an `include` for `ip4` and `ip6` terms only where the vendor publishes stable ranges, and note that [Microsoft advises against flattening its own include](https://learn.microsoft.com/en-us/defender-office-365/email-authentication-spf-configure) because the addresses change often.

### Should the record end in ~all or -all?

`~all` (softfail) says unlisted servers probably are not authorized. `-all` (fail) says they are not. [Google recommends `~all`](https://knowledge.workspace.google.com/admin/security/set-up-spf?hl=en), while Microsoft recommends `-all` for Microsoft 365 domains that also run DKIM and DMARC. RFC 9989 adds a caution: an SPF fail can reject a message early in the SMTP session, before DMARC runs, even when aligned DKIM would have passed, and mail rejected that way never appears in aggregate reports. Use `~all` while you collect reports, and move to `-all` only once every sender is known and you accept that risk.

## How does DKIM work, and how long should the key be?

A DKIM signature is a header the sending system adds before the message leaves. This one is illustrative, with the long values shortened:

```text
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=s2026;
  h=from:to:subject:date:message-id; bh=...; b=...
```

The `d=` tag names the signing domain and `s=` the selector. The `h=` tag lists the signed headers, which must include From, `bh=` is a hash of the body and `b=` is the signature ([RFC 6376](https://www.rfc-editor.org/rfc/rfc6376.html)). The receiver joins `s=` and `d=` into a DNS name and reads the public key from the TXT record there:

```text
s2026._domainkey.example.com.  IN  TXT  "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..."
```

![A sending server seals an envelope with a key. A lens at the receiving server checks the seal against a small orange key stored in a DNS database in a cloud above the path.](https://computese.com/images/blog/spf-dkim-dmarc/dkim-signature.5123e70e48-1536.webp)

*The sender signs with a private key, and the receiver verifies with the public key in DNS.*

The selector lets one domain publish several keys at once, one per sender or per rotation, and an empty `p=` marks a key as revoked.

Providers differ. Microsoft 365 asks for two CNAME records, `selector1._domainkey` and `selector2._domainkey`, and [the second stays idle until the next rotation](https://learn.microsoft.com/en-us/defender-office-365/email-authentication-dkim-configure). Google Workspace [generates a key](https://knowledge.workspace.google.com/admin/security/set-up-dkim?hl=en) for you to publish as a TXT record and allows up to 48 hours for it to work.

### How long should a DKIM key be?

[RFC 8301](https://www.rfc-editor.org/rfc/rfc8301.html) sets the floor and the target. Signers must use RSA keys of at least 1024 bits and should use at least 2048 bits, and `rsa-sha1` must not be used. Yahoo asks for at least 1024 bits. The Canadian Centre for Cyber Security recommends 2048-bit keys and accepts 1024 only for a device or service that cannot do better.

The practical snag is DNS. A single quoted string in a TXT record holds at most 255 characters, so a 2048-bit key goes in as two quoted strings back to back, as [Google's troubleshooting page](https://knowledge.workspace.google.com/admin/security/troubleshoot-dkim-issues?hl=en) shows.

### How often should you rotate DKIM keys?

The Canadian guidance advises rotating yearly: publish a new key under a new selector, switch the signer to it and delete the old record after a week. A dated selector such as `s2026` is the reminder, and the yearly DNS review in our [website maintenance guide](https://computese.com/website-maintenance/) is a good place to schedule it. Microsoft 365 takes 96 hours after a rotation request before the new key signs.

Anything that changes a signed header or the body after signing breaks the signature, and an outbound gateway that adds a footer to every message is one known cause.

## What goes in a DMARC record in 2026?

A DMARC record is one TXT record at `_dmarc` under the domain. `v=DMARC1` must come first, or the whole record is ignored, and if a query returns several records all are discarded. These are the tags most domains use, from [RFC 9989](https://www.rfc-editor.org/rfc/rfc9989.html):

| Tag               | Purpose                                                  | Notes                                                                                                 |
| ----------------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `p`               | Policy: `none`, `quarantine` or `reject`                 | If absent, treated as `p=none`                                                                        |
| `sp`, `np`        | Policy for existing and non-existent subdomains          | `sp` defaults to `p`; `np` is new                                                                     |
| `rua`             | Where aggregate reports go                               | `mailto:` addresses                                                                                   |
| `ruf`             | Where failure reports go                                 | [Gmail does not support it](https://knowledge.workspace.google.com/admin/security/set-up-dmarc?hl=en) |
| `adkim`, `aspf`   | Alignment: `r` relaxed or `s` strict                     | Both default to `r`                                                                                   |
| `t`               | `t=y` asks receivers to apply the policy one level lower | New; default `n`                                                                                      |
| `pct`, `rf`, `ri` | Sampling rate, failure format, report interval           | Historic; do not rely on them                                                                         |

The three rollout stages look like this, with a placeholder report mailbox:

```text
; Stage 1: monitor
_dmarc.example.com.  IN  TXT  "v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com"
; Stage 2: quarantine
_dmarc.example.com.  IN  TXT  "v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.com"
; Stage 3: reject
_dmarc.example.com.  IN  TXT  "v=DMARC1; p=reject; sp=reject; rua=mailto:dmarc-reports@example.com"
```

If reports go to a mailbox on another domain, that domain must publish a TXT record `v=DMARC1` at `example.com._report._dmarc.reports.example.net`, or receivers ignore the address ([RFC 9990](https://www.rfc-editor.org/rfc/rfc9990.html)).

### What changed with RFC 9989?

RFC 9989 replaced the original RFC 7489 and moved reporting into RFC 9990 (aggregate reports) and [RFC 9991](https://www.rfc-editor.org/rfc/rfc9991.html) (failure reports). Three changes matter to an ordinary domain. The `pct` tag is gone, because RFC 9989 says it was usually not applied accurately unless set to 0 or 100, and `t` takes over its testing use. The `np` tag covers subdomains that do not exist. And receivers find the policy and the organizational domain by a DNS tree walk of at most eight queries instead of the Public Suffix List. A record that still carries `pct` is not broken, but do not count on receivers applying it, even though Google's and Microsoft's rollout pages still show it.

## How do you set up SPF, DKIM and DMARC step by step?

Do these in order. Reports come before enforcement because, as RFC 9989 puts it, in all but the most trivial setups an owner can overlook a server or a third-party sending agreement.

1. **List every sender:** the mailbox provider, website forms, newsletter tool, invoicing, CRM, help desk and any device that relays mail. Also list domains that never send.
2. **Create a group or dedicated mailbox for reports,** because a busy domain can receive [hundreds of reports a day](https://knowledge.workspace.google.com/admin/security/about-dmarc-reports?hl=en).
3. **Publish one SPF record** that covers those senders within the 10-lookup budget.
4. **Turn on DKIM at each sender,** with your domain as the signing domain and 2048-bit keys where your DNS host allows.
5. **Check a real message.** Send mail from each system to a Gmail address, open **More**, then **Show original**, and read `Authentication-Results` for `spf=pass`, `dkim=pass` and a signing domain that matches your From domain.
6. **Wait 48 hours, then publish DMARC at `p=none`** with `rua`. Google asks for that gap after setting up SPF and DKIM.
7. **Read the reports,** fix every legitimate stream that fails alignment, then follow the rollout below.
8. **Protect domains that send nothing.** The Canadian guidance recommends `v=spf1 -all`, `p=reject` and a null MX record.

Check the DNS side from any terminal, replacing the selector with your sender's:

```bash
dig +short TXT example.com                      # one record starting v=spf1
dig +short TXT s2026._domainkey.example.com     # the DKIM key at your selector
dig +short TXT _dmarc.example.com               # one record starting v=DMARC1
```

A website form is the sender people forget. [Good Cleaner Co.](https://goodcleaner.ca/), a local cleaning company serving Ottawa homes and businesses whose site we build and run, sends its contact and job-application messages to the team's own inbox. They go out from the company's sender address, with the visitor's address in Reply-To. Neither form mails the address the visitor typed, so neither can act as a mail relay. If a form must mail an address someone types, such as a sign-up confirmation, put a bot check and a [rate limit](https://computese.com/rate-limiting/) in front of it.

> [!WARNING]
> When DNS moves, mail records must move with it. Copy every TXT, CNAME and MX record before changing name servers and lower the TTLs first, as the DNS cutover section of our [website migration guide](https://computese.com/website-migration-seo/) describes. A missing record shows up as authentication failures, not an error.

## How do you move from p=none to quarantine to reject?

The three policies are requests, not commands, and RFC 9989 says a receiver may choose whether to honour them. `p=none` asks receivers to take no action and send you reports. `p=quarantine` asks them to treat failing mail as suspicious, usually by sending it to spam. `p=reject` asks them to refuse it.

![Three side-by-side stages: a failing envelope passes through while a report sheet is filed, then is diverted into a side tray, then is stopped by a plain orange bar and turned back.](https://computese.com/images/blog/spf-dkim-dmarc/rollout-stages.4b0e42a8ff-1536.webp)

*Each stage asks receivers to do more with mail that fails: nothing, set it aside, then refuse it.*

The sources agree on that order and differ on the pace. As of December 2026:

| Source                                                                                                                                | Monitor first                                  | Then                                               | End state                                         |
| ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | -------------------------------------------------- | ------------------------------------------------- |
| [Google Workspace](https://knowledge.workspace.google.com/admin/security/recommended-dmarc-rollout?hl=en) (updated November 10, 2026) | `p=none` for one week                          | Quarantine for a small percentage with `pct`       | Reject if required                                |
| [Microsoft 365](https://learn.microsoft.com/en-us/defender-office-365/email-authentication-dmarc-configure)                           | `p=none`, length not given                     | Quarantine with `pct` steps of 10, 25, 50, 75, 100 | Reject is the goal                                |
| RFC 9989 (May 2026)                                                                                                                   | A month or more, where users may post to lists | Quarantine for as long again                       | General-purpose domains should not publish reject |
| Canadian Centre for Cyber Security (2021)                                                                                             | Until reports are clean                        | Quarantine, then reject                            | Reject at 100%                                    |

Our advice: decide by who sends. Run `p=none` for at least a month, so it covers a billing cycle, and longer if any system sends only quarterly, then `p=quarantine` for as long again. Stop there for a domain whose staff write to outside mailing lists, the case RFC 9989 warns about. Go on to `p=reject` for domains and subdomains that only machines send from, and for domains that send nothing. Yahoo [advises separating mail by function](https://senders.yahooinc.com/best-practices/), because each IP address and DKIM domain has its own reputation.

To trial a stricter policy, publish it with `t=y`, so receivers that implement the tag apply it one level lower. Fix legitimate failures before you enforce, because RFC 9989 says those shortcomings must be addressed first.

Public DNS shows the stages. As of December 2026, [Minute Notary](https://minutenotary.ca/), an online notary platform we build and run, publishes `p=quarantine` for the domain and its subdomains and a 2048-bit DKIM key. [Via Ottawa](https://viaottawa.ca/), a guide to local businesses across Ottawa that we build and run, publishes `p=quarantine` too. A third domain we manage is still at the monitoring stage: `p=none` with reports switched on.

Via Ottawa shows why the order matters, because for a time it ran the other way round. Its domain published quarantine before any system could send mail that aligned with it. With no DKIM key of its own, mail sent through a mailbox provider's SMTP failed DMARC and landed in spam, so the emails new users needed probably never arrived. A DNS check in September 2026 found the gap. In October sending moved to a delivery service. It signs with a key published under the domain and uses a dedicated subdomain with its own SPF record. The mail worker also refuses to start when the From address is missing and, on the mailbox-provider route, when it does not match the account that authenticates, because that provider rewrites a From it does not own without any error.

### How do you read DMARC aggregate reports?

Receivers that send reports do so at least daily to your `rua` address, as an XML attachment, normally gzip-compressed ([RFC 9990](https://www.rfc-editor.org/rfc/rfc9990.html)). The counts include messages that other filters went on to block. RFC 9989 recommends machine-parsing them, and [Google recommends a third-party service](https://knowledge.workspace.google.com/admin/security/about-dmarc-reports?hl=en) when volume is high.

![Three servers each send a report sheet to one orange mailbox tray. A box with a gear turns the reports into a grid of grey bars, a table.](https://computese.com/images/blog/spf-dkim-dmarc/aggregate-reports.163d426fc7-1536.webp)

*Receivers send daily reports to one address, and a tool turns them into a table you can act on.*

Each `record` counts the messages from one sending IP. This made-up record repeats the vendor failure from earlier:

```xml
<row>
  <source_ip>203.0.113.25</source_ip>
  <count>42</count>
  <policy_evaluated><disposition>none</disposition><dkim>fail</dkim><spf>fail</spf></policy_evaluated>
</row>
<identifiers><header_from>example.com</header_from></identifiers>
<auth_results>
  <dkim><domain>vendor.example</domain><selector>s1</selector><result>pass</result></dkim>
  <spf><domain>bounce.vendor.example</domain><scope>mfrom</scope><result>pass</result></spf>
</auth_results>
```

The `policy_evaluated` element holds the alignment results and `auth_results` what the checks themselves said. Here both passed but neither aligned, the vendor pattern. A source you recognize that fails alignment needs a fix at the sender, and one you do not recognize is spoofing or a service nobody told you about.

## What do Gmail, Yahoo and Outlook.com require from bulk senders?

Since 2024 the largest receivers have required authentication from high-volume senders. These are the rules as each provider's own page states them:

|                | Gmail                                                                                                                           | Yahoo                                                                                  | Outlook.com                                                          |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| Who and when   | Close to 5,000 messages a day to personal accounts; from February 1, 2024, enforcement ramping up from November 2025            | Bulk senders, no volume given; from February 2024                                      | Over 5,000 a day; announced April 2, 2025, enforced from May 5, 2025 |
| Authentication | SPF and DKIM, DMARC at least `p=none`, From aligned with SPF or DKIM                                                            | SPF and DKIM, DMARC at least `p=none` and passing; relaxed alignment accepted          | SPF and DKIM pass, DMARC at least `p=none` aligned with one          |
| Unsubscribe    | One-click for marketing mail plus a visible link; honour within 48 hours                                                        | One-click header (RFC 8058 POST recommended) plus a visible link; honour within 2 days | Functional link listed as a practice; no one-click rule stated       |
| If you miss it | Failure codes or spam foldering for authentication and alignment; no mitigation support for a missing DMARC record or one-click | A negative effect on delivery, no code given                                           | Rejection with `550 5.7.515` per the April 2025 update               |

These rows come from [Google's sender guidelines](https://support.google.com/mail/answer/81126?hl=en) and its [FAQ](https://support.google.com/mail/answer/14229414?hl=en), [Yahoo's best practices](https://senders.yahooinc.com/best-practices/) and [Microsoft's announcement](https://techcommunity.microsoft.com/blog/microsoftdefenderforoffice365blog/strengthening-email-ecosystem-outlook%E2%80%99s-new-requirements-for-high-volume-senders/4399730). Gmail's bulk status is permanent once reached. Microsoft's post still carries its earlier wording about the Junk folder first, beside the April update that says rejection, so check your bounce logs for the code. Under 5,000 a day you are not exempt: Google asks every sender for SPF or DKIM, valid forward and reverse DNS and TLS. Google and Yahoo also want spam rates under 0.3%, and Google advises under 0.10%.

[RFC 8058](https://www.rfc-editor.org/rfc/rfc8058.html) defines one-click unsubscribe with two headers, and a valid DKIM signature must cover both:

```text
List-Unsubscribe: <https://mail.example.com/unsubscribe/7f3a9c>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
```

The address must be HTTPS, must not redirect, and must identify the recipient and list on its own, ideally with a hard-to-forge token, because the receiver unsubscribes the person with a POST that carries no cookies.

Minute Notary treats the abandoned-booking follow-ups it sends as commercial messages under Canada's anti-spam law, so each carries an unsubscribe link in the body and the two RFC 8058 headers. The opt-out list stores a hash of the address, not the address, so a purged enquiry can never bring a contact back. The link opens a page with one button, and only a POST records the opt-out, because link scanners and mail-client prefetchers often open the links in an email and none of them may unsubscribe a customer.

Complaints matter as much as headers. Send only to people who asked for the mail, and suppress addresses that bounce or complain. Where your delivery service reports those events to your site by webhook, treat that endpoint like any other [webhook receiver](https://computese.com/what-is-a-webhook/).

## What breaks when mail is forwarded or sent through a mailing list?

Forwarding and mailing lists send your mail through a server that is not yours, and each breaks a different check ([RFC 7960](https://www.rfc-editor.org/rfc/rfc7960.html)).

**Forwarding usually breaks SPF.** If the forwarder keeps your envelope sender, SPF fails unless the forwarder is authorized in your record. If it replaces the envelope sender with its own, SPF can pass but no longer aligns. Either way DKIM has to carry the DMARC pass, and a signature can survive a plain relay.

**Mailing lists break DKIM.** Lists commonly add a subject tag or footer, remove MIME parts or convert to plain text, and any of those invalidates the signature. When a list reposts mail from a `p=reject` domain without rewriting the From line, RFC 9989 says it is frequently rejected, and list software can read the refusals as dead addresses and unsubscribe the subscribers. List software has since adopted workarounds that rewrite the From address.

![An envelope with a seal leaves a sender, passes a relay outside the sender's dashed outline where a footer strip is added, and arrives with its orange seal cracked.](https://computese.com/images/blog/spf-dkim-dmarc/forwarding-break.998822a861-1536.webp)

*A forwarder is not in the sender's SPF record, and a footer added on the way breaks the DKIM signature.*

Three rules follow. Sign every message with DKIM, because RFC 9989 says a domain that publishes reject must not rely on SPF alone. Keep the domains your people write from at quarantine if they post to outside lists. And read your reports: receivers can note in a `reason` field that they delivered failing mail because it came through a mailing list or a trusted forwarder.

### What is ARC, and does it fix this?

The Authenticated Received Chain, [RFC 8617](https://www.rfc-editor.org/rfc/rfc8617.html), lets each intermediary seal the authentication results it saw, so the final receiver can tell what passed before the message was changed. It is an Experimental RFC from July 2019, and RFC 9989 says that after about a decade of attempts none of the methods for letting lists keep the From line have become widely used. [Gmail reads ARC results on forwarded mail](https://support.google.com/mail/answer/180707?hl=en), and Microsoft 365 lets administrators [name trusted ARC sealers](https://learn.microsoft.com/en-us/defender-office-365/email-authentication-arc-configure).

## How do you troubleshoot SPF, DKIM and DMARC failures?

Start with the evidence: the `Authentication-Results` header from step 5, or the headers pasted into the message header tool in [Google's Admin Toolbox](https://knowledge.workspace.google.com/admin/security/troubleshoot-dmarc-issues?hl=en). Then match the symptom:

| What you see                                                 | Likely cause                                                             | What to do                                                                 |
| ------------------------------------------------------------ | ------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
| `spf=permerror` or "too many DNS lookups"                    | More than 10 lookups, two SPF records, or a syntax error                 | Count lookups, drop unused includes, merge to one record                   |
| `spf=softfail` or `fail` for mail you sent                   | The sender's IP is not in your record                                    | Add the service's include, then wait 24 to 48 hours                        |
| `spf=pass` and `dkim=pass` but `dmarc=fail`                  | Both passes belong to the vendor's domain                                | Sign with your domain, or use a bounce subdomain of yours                  |
| `dkim=fail`, "body hash did not verify"                      | The message changed after signing, such as a gateway footer              | Sign after the last edit, or stop the gateway editing                      |
| No DKIM result, or the DNS host refuses the key              | DKIM is off, the selector is wrong, or a 2048-bit key exceeds one string | Check the record at the selector; split a long key into two quoted strings |
| Bounce `5.7.26`, "not accepted due to domain's DMARC policy" | Mail failed DMARC under quarantine or reject                             | Fix SPF or DKIM alignment; strict alignment makes failure likelier         |
| Everything passes and mail still lands in spam               | Authentication is not reputation or content                              | Check spam rate, list quality, content and complaint handling              |

The rows draw on Google's troubleshooting pages for [SPF](https://knowledge.workspace.google.com/admin/security/troubleshoot-spf-issues?hl=en) and DMARC. Change one record at a time and note its TTL first, because a change you want to undo can stay cached for that long. If you are enforcing and legitimate mail is failing, step back one level while you fix it.

## What are BIMI, MTA-STS and TLS-RPT, and do you need them?

None of these is a reason to delay the core three.

**BIMI** shows a brand logo beside authenticated mail. It is still an [IETF draft](https://datatracker.ietf.org/doc/draft-brand-indicators-for-message-identification/), revision 15 of October 31, 2026, and it requires a quarantine or reject policy on both the organizational domain and the From domain, so it rewards finishing the rollout.

**MTA-STS** ([RFC 8461](https://www.rfc-editor.org/rfc/rfc8461.html), 2018) protects mail sent to your domain. An attacker who deletes the `250 STARTTLS` response can strip SMTP's opportunistic encryption, and MTA-STS lets you publish that senders should require valid TLS. It uses a TXT record at `_mta-sts` and a policy file at `https://mta-sts.example.com/.well-known/mta-sts.txt`, with a mode of `testing`, `enforce` or `none`. The policy host needs a valid certificate, so our [SSL certificate renewal guide](https://computese.com/ssl-certificate/) applies. **TLS-RPT** ([RFC 8460](https://www.rfc-editor.org/rfc/rfc8460.html)) is the reporting side: a TXT record at `_smtp._tls` tells senders where to send TLS failure reports.

## What should you do this week?

1. List every system that sends as your domain, and every domain that sends nothing.
2. Merge SPF into one record ending in `~all`, and make each sender sign with your own domain.
3. Publish DMARC at `p=none` with reports going to a dedicated mailbox or a processing service.
4. Read the reports for a month, fix what fails alignment, then move to quarantine and decide on reject by who sends.

Our [IT support service](https://computese.com/services/it-support/) administers Microsoft 365 and Google Workspace tenants, including mail flow with DMARC, SPF and DKIM, and our [hosting and maintenance service](https://computese.com/services/hosting-maintenance/) inventories sites, domains and mail and runs DNS cutovers with lowered TTLs.

## Key terms
- **SPF**: Sender Policy Framework (RFC 7208): a DNS TXT record listing the servers allowed to send mail for a domain. The receiver checks the connecting IP address against it for the envelope sender's domain.
- **DKIM**: DomainKeys Identified Mail (RFC 6376): a signature the sending system adds with a private key. The receiver verifies it with the public key published at selector._domainkey.domain.
- **DMARC**: A policy published at _dmarc.domain that passes a message when SPF or DKIM passes for a domain aligned with the From domain, says what receivers should do on failure and asks for reports. RFC 9989 (May 2026) is current.
- **Alignment**: The match between the From domain and the domain that SPF or DKIM validated. Relaxed alignment, the default, accepts the same organizational domain; strict alignment needs identical names.
- **Envelope sender**: The MAIL FROM address given in the SMTP conversation, also called the Return-Path address, and the identity SPF checks. It can differ from the From header the reader sees.
- **Selector**: The s= value in a DKIM signature. Joined with d= it names the DNS record holding the public key, so one domain can publish several keys at once.
- **Organizational domain**: The domain at the top of a name's DNS hierarchy under the same administrative authority, such as example.com for news.example.com. RFC 9989 finds it with a DNS tree walk.
- **Aggregate report**: A daily XML report, normally gzip-compressed, that a receiver sends to the rua address. It counts messages by sending IP with their SPF, DKIM and alignment results (RFC 9990).
- **ARC**: Authenticated Received Chain (RFC 8617, Experimental): each intermediary seals the authentication results it saw, so a final receiver can judge forwarded mail whose SPF or DKIM no longer passes.
- **permerror**: The SPF result for a permanent error, such as two SPF records on one name or more than 10 DNS-querying terms. Evaluation stops, and DMARC counts it as not passing.

## Common questions

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

SPF lists the servers allowed to send mail for a domain, DKIM signs each message with a key published in DNS, and DMARC requires that a passing SPF or DKIM check be for a domain that matches the visible From address. DMARC also tells receivers what to do with failures and where to send reports. None is enough alone, because SPF and DKIM can both pass for a domain unrelated to the From address.

### What is the difference between p=none, p=quarantine and p=reject?

p=none asks receivers to take no action and send you reports, p=quarantine asks them to treat failing mail as suspicious, usually by sending it to spam, and p=reject asks them to refuse it. They are requests, and RFC 9989 says the receiver makes the final decision. Start at p=none and fix every legitimate sender that fails alignment before moving up.

### What are the Gmail, Yahoo and Outlook.com bulk sender requirements?

Gmail and Yahoo began enforcing in February 2024 and Outlook.com in May 2025: Gmail and Outlook.com for senders of about 5,000 messages a day or more, Yahoo for bulk senders. All three expect SPF, DKIM and a DMARC record of at least p=none that aligns with the From domain. Gmail and Yahoo also ask for one-click unsubscribe on marketing mail and want spam rates under 0.3%.

### What does the SPF "too many DNS lookups" error mean?

SPF allows at most 10 terms that cause DNS queries (include, a, mx, ptr, exists and redirect), counting nested includes, and returns a permanent error past that. Remove services you no longer use, move third-party senders to a subdomain with its own record, and swap an include for IP ranges only where the vendor publishes stable ones.

### How long should a DKIM key be?

Use 2048-bit RSA keys. RFC 8301 says signers must use at least 1024 bits and should use at least 2048, and Yahoo asks for at least 1024. A 2048-bit key is longer than one 255-character DNS string, so it goes into the TXT record as two quoted strings.

### Do SPF, DKIM and DMARC improve email deliverability?

They are the entry requirement, not a guarantee. Gmail's help says spammers can authenticate mail too, so authentication alone does not ensure delivery, while Google, Yahoo and Microsoft now expect it from bulk senders. Spam rate, list quality and complaint handling decide the rest.

## Sources
1. [RFC 9989: Domain-Based Message Authentication, Reporting, and Conformance (DMARC)](https://www.rfc-editor.org/rfc/rfc9989.html), IETF
2. [RFC 7208: Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1](https://www.rfc-editor.org/rfc/rfc7208.html), IETF
3. [RFC 6376: DomainKeys Identified Mail (DKIM) Signatures](https://www.rfc-editor.org/rfc/rfc6376.html), IETF
4. [Check if your Gmail message is authenticated](https://support.google.com/mail/answer/180707?hl=en), Gmail Help
5. [Implementation guidance: email domain protection (ITSP.40.065 v1.1)](https://cyber.gc.ca/en/guidance/implementation-guidance-email-domain-protection), Canadian Centre for Cyber Security
6. [RFC 8601: Message Header Field for Indicating Message Authentication Status](https://www.rfc-editor.org/rfc/rfc8601.html), IETF
7. [Set up SPF to identify valid email sources for your Microsoft 365 domain](https://learn.microsoft.com/en-us/defender-office-365/email-authentication-spf-configure), Microsoft Learn
8. [Set up SPF](https://knowledge.workspace.google.com/admin/security/set-up-spf?hl=en), Google Workspace Admin Help
9. [How to use DKIM for email in your custom domain](https://learn.microsoft.com/en-us/defender-office-365/email-authentication-dkim-configure), Microsoft Learn
10. [Set up DKIM](https://knowledge.workspace.google.com/admin/security/set-up-dkim?hl=en), Google Workspace Admin Help
11. [RFC 8301: Cryptographic Algorithm and Key Usage Update to DomainKeys Identified Mail (DKIM)](https://www.rfc-editor.org/rfc/rfc8301.html), IETF
12. [Troubleshoot DKIM issues](https://knowledge.workspace.google.com/admin/security/troubleshoot-dkim-issues?hl=en), Google Workspace Admin Help
13. [Set up DMARC](https://knowledge.workspace.google.com/admin/security/set-up-dmarc?hl=en), Google Workspace Admin Help
14. [RFC 9990: Domain-Based Message Authentication, Reporting, and Conformance (DMARC) Aggregate Reporting](https://www.rfc-editor.org/rfc/rfc9990.html), IETF
15. [RFC 9991: Domain-Based Message Authentication, Reporting, and Conformance (DMARC) Failure Reporting](https://www.rfc-editor.org/rfc/rfc9991.html), IETF
16. [About DMARC reports](https://knowledge.workspace.google.com/admin/security/about-dmarc-reports?hl=en), Google Workspace Admin Help
17. [Recommended DMARC rollout](https://knowledge.workspace.google.com/admin/security/recommended-dmarc-rollout?hl=en), Google Workspace Admin Help
18. [Set up DMARC to validate email in Microsoft 365](https://learn.microsoft.com/en-us/defender-office-365/email-authentication-dmarc-configure), Microsoft Learn
19. [Sender Best Practices](https://senders.yahooinc.com/best-practices/), Yahoo Sender Hub
20. [Email sender guidelines](https://support.google.com/mail/answer/81126?hl=en), Google Workspace Admin Help
21. [Email sender guidelines FAQ](https://support.google.com/mail/answer/14229414?hl=en), Google Workspace Admin Help
22. [Strengthening Email Ecosystem: Outlook’s New Requirements for High-Volume Senders](https://techcommunity.microsoft.com/blog/microsoftdefenderforoffice365blog/strengthening-email-ecosystem-outlook%E2%80%99s-new-requirements-for-high-volume-senders/4399730), Microsoft Community Hub
23. [RFC 8058: Signaling One-Click Functionality for List Email Headers](https://www.rfc-editor.org/rfc/rfc8058.html), IETF
24. [RFC 7960: Interoperability Issues between DMARC and Indirect Email Flows](https://www.rfc-editor.org/rfc/rfc7960.html), IETF
25. [RFC 8617: The Authenticated Received Chain (ARC) Protocol](https://www.rfc-editor.org/rfc/rfc8617.html), IETF
26. [Configure trusted ARC sealers](https://learn.microsoft.com/en-us/defender-office-365/email-authentication-arc-configure), Microsoft Learn
27. [Troubleshoot DMARC issues](https://knowledge.workspace.google.com/admin/security/troubleshoot-dmarc-issues?hl=en), Google Workspace Admin Help
28. [Troubleshoot SPF issues](https://knowledge.workspace.google.com/admin/security/troubleshoot-spf-issues?hl=en), Google Workspace Admin Help
29. [Brand Indicators for Message Identification (BIMI), draft-brand-indicators-for-message-identification-15](https://datatracker.ietf.org/doc/draft-brand-indicators-for-message-identification/), IETF Datatracker
30. [RFC 8461: SMTP MTA Strict Transport Security (MTA-STS)](https://www.rfc-editor.org/rfc/rfc8461.html), IETF
31. [RFC 8460: SMTP TLS Reporting](https://www.rfc-editor.org/rfc/rfc8460.html), IETF
