---
title: "Domain-based Message Authentication, Reporting and Conformance (DMARC)"
description: "DMARC ties SPF and DKIM to the visible From: header, tells receivers what to do when authentication fails, and reports back who is sending as your domain."
url: "https://mailmum.io/glossary/domain-based-message-authentication-reporting-and-conformance-dmarc/"
---

# Domain-based Message Authentication, Reporting and Conformance (DMARC)

DMARC ties [SPF](https://mailmum.io/glossary/sender-policy-framework-spf/) and
[DKIM](https://mailmum.io/glossary/domainkeys-identified-mail-dkim/) to the `From:` header the
recipient actually sees, tells receiving servers what to do when neither
authenticates, and sends the domain owner reports about who is sending mail as
their domain.

It is defined in [RFC 7489](https://www.rfc-editor.org/rfc/rfc7489). Without it,
SPF and DKIM authenticate identifiers a recipient never looks at, and a message
can pass both while displaying any sender address at all.

## What does a DMARC record look like?

A TXT record at the `_dmarc` subdomain:

```sh
$ dig +short TXT _dmarc.example.com
"v=DMARC1; p=reject; rua=mailto:dmarc@example.com; adkim=s; aspf=s"
```

| Tag | Meaning |
| --- | --- |
| `p=` | policy: `none`, `quarantine` or `reject` |
| `sp=` | a different policy for subdomains |
| `rua=` | where to send aggregate reports |
| `ruf=` | where to send forensic reports, rarely supported |
| `pct=` | apply the policy to only this percentage of mail |
| `adkim=` / `aspf=` | alignment mode, `r` relaxed (default) or `s` strict |

## What is alignment, and why does it matter?

Alignment is the entire point of DMARC. A message passes DMARC when at least one
of the following holds:

* SPF passes **and** the envelope sender domain aligns with the `From:` domain,
  or
* DKIM passes **and** the signature's `d=` aligns with the `From:` domain.

Without alignment, an attacker registers `attacker.example`, publishes a valid
SPF record and signs with a valid DKIM key for it, then sends mail with
`From: billing@yourbank.example`. Both checks pass &mdash; for the wrong domain.
Alignment is what makes that fail.

Relaxed alignment (`r`) accepts an organisational-domain match, so
`mail.example.com` aligns with `example.com`. Strict (`s`) requires an exact
match, which is more rigorous and more likely to break a third-party sender.

## What do the policies do?

* **`p=none`** &mdash; do nothing differently, but send me reports. This is a
  monitoring mode, not protection.
* **`p=quarantine`** &mdash; treat failing mail as suspicious, in practice the
  spam folder.
* **`p=reject`** &mdash; refuse failing mail at the SMTP level.

Only `p=reject` actually stops someone spoofing your domain. A record with
`p=none` that has sat unchanged for three years is a very common state and
provides no defence against the
[attack vector](https://mailmum.io/glossary/attack-vector/) it was published to address.

## How do you roll DMARC out safely?

The order matters, because going straight to `p=reject` will block your own
mail from services you have forgotten about:

1. **Publish `p=none` with a `rua=` address.** Change nothing else.
2. **Read the aggregate reports for a few weeks.** They will list every source
   sending as your domain &mdash; including the CRM, the invoicing system and
   the monitoring host nobody documented.
3. **Fix each legitimate source** so it either passes aligned SPF or is signed
   with an aligned DKIM key. Sources you do not recognise are the ones DMARC
   exists to stop.
4. **Move to `p=quarantine`**, optionally with `pct=` to ramp gradually.
5. **Move to `p=reject`** once the reports show no legitimate failures.

Steps 2 and 3 are the work. Steps 1, 4 and 5 are DNS edits.

## What are aggregate reports?

Receiving providers send a daily XML summary to the `rua=` address, grouped by
source IP:

```xml
<record>
  <row>
    <source_ip>192.0.2.25</source_ip>
    <count>184</count>
    <policy_evaluated>
      <disposition>none</disposition>
      <dkim>pass</dkim>
      <spf>fail</spf>
    </policy_evaluated>
  </row>
  <identifiers>
    <header_from>example.com</header_from>
  </identifiers>
</record>
```

These are the most useful inventory of your own sending infrastructure you will
ever get, and they arrive whether or not you asked for the inventory. Reading
them raw is unpleasant at volume, so most operators feed them into a parser.

## What DMARC does not solve

* **Lookalike domains.** `exarnple.com` is not your domain, so your policy has
  no bearing on it. DMARC protects the exact domain and its subdomains, nothing
  more.
* **Display name spoofing.** `From: "Your Bank" <random@gmail.com>` passes DMARC
  for `gmail.com` and displays a trusted name in most clients.
* **Compromised accounts.** Mail sent through your own infrastructure with
  stolen credentials authenticates perfectly. See
  [access management](https://mailmum.io/glossary/access-management-in-email-systems/).
* **Mailing lists.** Lists that modify messages break DKIM and do not align SPF,
  so a `p=reject` policy causes list mail from your domain to be rejected. Most
  lists work around this by rewriting the `From:` header.

## Related reading

[Howto block Google Groups spam in
Rspamd](https://mailmum.io/posts/howto-block-google-groups-spam-in-rspamd/) is worth reading
alongside this page. The spam described there passes DMARC, because it is sent
by the infrastructure the domain authorised. DMARC answers "is this domain
really the sender", never "is this message wanted".
