Our website is in Dutch; support is available in English.

Reading DMARC reports: making sense of the XML

What an aggregate report contains, why SPF can pass while DMARC fails, and how to trace an unknown IP address.

Updated 4 minute read

Contents of this article
  1. What lands in your mailbox
  2. What they actually contain
  3. Alignment: why SPF can pass and DMARC still fail
  4. Tracing an unknown IP address
  5. Choose your analyzer deliberately
  6. What we don't do here
  7. Our advice: monitor first, then tighten
  8. Further reading

As soon as you put a report address in your DMARC record, reports start arriving as XML attachments. This page explains what such a report actually contains, what "alignment" means and how to find out who an unknown IP address belongs to.

What lands in your mailbox

If you publish a DMARC record with a rua= address, receiving parties (large providers such as Google and Microsoft, but smaller mail servers too) send you aggregate reports. Usually one per party per day. Each report is an XML file, typically packed as .zip or .gz.

You can unpack and open it, but then you are looking at dozens of lines of IP addresses and counters. The format is meant for software, not for people. Working through one report by hand is doable; comparing twenty reports a day side by side is not.

There is also a second kind, the forensic reports via ruf=. Hardly any of the large parties send those any more. Don't count on them.

What they actually contain

An aggregate report has one row per sending IP address, containing:

  • the IP address that sent messages claiming to come from your domain;
  • how many messages that was in the reporting period;
  • whether the SPF check passed, and for which domain;
  • whether the DKIM check passed, and with which selector and domain;
  • whether those results were aligned with the domain in your From field;
  • which policy the receiver ended up applying.

What they do not contain: no subject lines, no recipients, no message content. And no names of your systems either, only IP addresses. Matching those up is exactly the work left to you.

Alignment: why SPF can pass and DMARC still fail

This is the concept almost everyone gets stuck on. SPF checks the domain of the envelope sender, the so-called return-path. That is not the address your recipient sees in their mail program; that is the From field.

A newsletter service often sends with a return-path on its own domain, while your domain is in the From field. The SPF check then passes neatly, but for the service's domain. DMARC, however, requires the domain that passed the check to be the same as the domain in the From field. If it isn't, there is no alignment and DMARC fails, however green SPF looks in the report.

The same goes for DKIM: the signature must be made with a key on your own domain or a subdomain of it. DMARC passes as soon as one of the two, SPF or DKIM, passes and is aligned. So a row saying "SPF: pass" is not yet proof that things are set up correctly.

Tracing an unknown IP address

Your first reports will always contain addresses you don't recognise. Here is how to deal with them:

  1. Look up the reverse DNS with host <ip> or dig -x <ip>. In many cases the name of the service is right there.
  2. No reverse DNS? Look up the range in the RIPE database, or at ARIN or APNIC if it is outside Europe. That tells you who holds the IP range.
  3. Compare with your own list. Go through your mail server, newsletter, accounting software, web forms, ticketing system and CRM. The unknown address usually turns out to be a system you had forgotten about.
  4. Still unknown? Small numbers are often forwarded mail, where SPF simply breaks. Large numbers from a single unknown address mean you are missing a sender or someone is abusing your domain.

Choose your analyzer deliberately

Because the reports can't be read by hand, you need an analyzer: a service that reads in the XML and turns it into an overview. That is not a technical choice but a choice about your data, because you send those reports to that party. That is why we list the European options first.

URIports is a Dutch company, with servers in the Netherlands and a free tier that is more than enough for most domains. dmarcian has a European branch.

Most other well-known analyzers are American. You are free to choose one, and the reports generally contain no message content, but then what we describe on our page about the US CLOUD Act (in Dutch) applies. Weigh that consciously against the fact that the free Dutch option exists too.

What we don't do here

We don't read your DMARC reports for you and we don't sell a reporting dashboard. Our report reader works one report at a time and keeps no history of who has sent mail on behalf of your domain. If you have many systems sending mail in your name, a specialised analyzer is a better choice than our reader, even if you are not our customer.

Our advice: monitor first, then tighten

Leave your DMARC policy on p=none for a few weeks and read the reports during that period. Only when they show that all your genuine mail passes and is aligned do you move to p=quarantine, and later to p=reject. Tighten it any earlier and your own invoices get discarded without anyone noticing. Preventing that is exactly what the reports are for.

Further reading

Was this article helpful?

Still stuck?

Send us a message. We will help you, usually within one working day.