What a DMARC report is and how to read it

That email with a weird XML attachment is your DMARC report. Here is what it is, how it reached you, and what each part means.

You published a DMARC record, and now emails with strange XML attachments keep landing in your inbox. That attachment is the whole point. It is a DMARC report, and it tells you which mail using your domain passes your policy and which does not. Here is what it is and what to do with it.

What a DMARC report actually is

DMARC reports are sent by mail receivers, the organizations that receive and process email. They send them to domain owners who ask for them. A receiver that supports DMARC is under no obligation to send reports, though sending the aggregate kind is recommended.

There are two kinds. Aggregate reports are defined in RFC 9990. They show a domain owner the sources of mail using the Author Domain, the domain in the From header. They arrive as XML files attached to email. Failure reports are different. A receiver that supports DMARC might also generate per-message failure reports about individual messages that fail the DMARC check. The standard says these are useful when debugging deployments or analyzing attacks.

Most people only ever see aggregate reports. Gmail does not support the ruf tag, which is used to send failure reports.

How reports reach you

Reports go wherever your DMARC record tells them to go. The rua tag lists the addresses that receive aggregate reports. RFC 9989 lists rua as an active tag for aggregate feedback URIs, and ruf as the tag for message-specific failure reports.

The address must include the mailto prefix. Google Workspace Help says the rua tag sends reports to an email address, and that address must include mailto. Without mailto, a receiver that wants to send you a report has nowhere valid to send it. RFC 9989 says mail receivers must not make aggregate reports if the rua tag is missing. The standard also says a report should go to each URI listed in the record.

Do not point rua at your personal inbox. Google recommends a dedicated mailbox, a group, or a third-party service instead. Reports arrive from many receivers, and they pile up fast.

Reports can go to a different domain than the one being monitored. A domain owner can act as the report consumer for its own domains, or name a third party to do it. When reports go to an address in another domain, Google Workspace Help says you must add a TXT record to that email domain's DNS.

Anatomy of an aggregate report

Open the XML and you will find a few sections. Here is what each one tells you.

The policy section shows the DMARC record the receiver saw, including your p tag and alignment mode. If this does not match what you think you published, your DNS change has not propagated or something is wrong.

Below that sit the records. Each record covers one sending source. A row has the sending IP, a message count, and the disposition, which is what the receiver did with that mail.

Each row also carries the authentication results. The preserved SPF results must include pass or fail and the domain name used for the SPF check. The preserved DKIM results must include pass or fail plus the d and s tags from each checked signature. Then comes the policy evaluation: whether SPF aligned, whether DKIM aligned, and the final DMARC result.

Alignment is the part people miss. A message passes the DMARC check if one or more authenticated identifiers align with the Author Domain. It fails if none exist or none align. Relaxed alignment means the two share the same organizational domain. Under strict alignment, the two names have to match exactly. The standard says nearly all domain owners have found relaxed alignment sufficient.

What the report is telling you

A source that fails is not automatically a criminal. The standard says failing mail streams may be illegitimate uses like spoofing, or legitimate uses that lack aligned authenticated identifiers. Some messages making authorized use of your domain can still fail the check. One example is your own billing system sending through a vendor's server.

This is why you audit before you enforce. The standard calls starting at p=none putting the domain into Monitoring Mode. A domain owner at p=none uses aggregate reports to audit its own mail streams. Starting there makes sure nothing was missed in the initial SPF and DKIM deployments. The standard says a domain owner has to repair its own failing mail streams before moving the domain to an enforcement policy. Going straight to p=reject can get your real mail rejected too, not only the mail sent in your name without permission.

So sort failing sources into two piles. For each one, ask whether you or a vendor sent it. If yes, fix SPF or DKIM so it aligns. If no, it is someone else using your domain, and enforcement will deal with it once your own mail is clean.

One caution on the other side: a DMARC pass does not by itself guarantee that delivery to the recipient's inbox would be safe or desirable. Passing mail is authenticated, not necessarily wanted.

Reading reports at scale

You do not have to read these by hand, and you should not try. The standard recommends that aggregate reports be machine-parsed rather than read by a human. The standard also notes that plenty of outside services will handle the parsing for you, and building your own tool is another option. A report viewer parses the XML, groups sources, and shows you pass and fail counts per sender. Google says the reports help you identify possible authentication issues and malicious activity. Gmail's guidelines say they help you spot senders that may be impersonating your domain.

Failure reports need more care. They may include personal and non-public information from messages that fail authentication, and can expose the entire message to the report consumer. Unredacted ones can propagate spam, phishing, or malware content. The guidance says report consumers should isolate report streams from other mail. It says to use sandboxes when evaluating failure reports, and to limit access to people with security training. Report generators should substitute hxxp for http in URIs and strip dangerous attachments. If you do not have a use for failure reports, do not request them.

A worked example

Say your aggregate report has two records.

The first shows 4,000 messages from an IP belonging to your email vendor. SPF passes with your domain, DKIM passes with your domain in the d tag, and DMARC passes. Action: nothing. This is your mail, authenticating as it should.

The second shows 300 messages from an IP you do not recognize. SPF fails, DKIM fails, and DMARC fails. Action: check whether anyone at your company sent it. If not, it is spoofing, and it is the mail a later move to p=quarantine or p=reject asks receivers to act on. If those 300 messages were your own newsletter sent through an unconfigured tool, fix that tool first.

That is the whole loop. Publish the record with a rua tag, collect reports at p=none, fix your own failing streams, then enforce. If reports stop arriving, check that the rua address still resolves and that any external-domain authorization record is still in place.

Sources

Filed

More filed under DMARC and BIMI

  • DMARC policy options: none, quarantine, and reject
  • How to Set Up DMARC for Google Workspace
  • How to set up a DMARC record for your domain
  • How a BIMI Logo Gets Next to Your Email
  • What BIMI Is and How It Works
  • Every DMARC Tag, What It Does, and Which You Need
  • How DMARC Handles Subdomains and the sp Tag
  • DMARC configuration, one tag at a time
  • Why a DMARC lookup Says Record Not Found
  • The DMARC TXT Record, Tag by Tag
  • SPF, DKIM, and DMARC, Explained Simply
  • What DMARC Is and How It Works