Reading DMARC reports (analyzers, readers, open source)

How do you evaluate DMARC reports?

A DMARC aggregate report (rua report) is an XML document that a receiving mail server sends to the address given under rua in the DMARC record. It says which IP addresses delivered mail in the name of a domain, how many messages that was, and how SPF, DKIM and DMARC evaluated them.

Single reports can be read by hand. RFC 9989 notes, however, that while a human can read them, machine parsing is recommended.

There are several kinds of tools for evaluating reports. Open source comes, according to the project pages (none of them tested), as a parser with dashboards (parsedmarc), as a converter into readable formats (dmarc-report-converter) and as a viewer on top of a database (dmarcts-report-viewer).

Which standard applies?

RFC 7489 has been replaced by three new RFCs, and aggregate reporting is now in RFC 9990.

Where do the reports come from?

Reports arrive only if the DMARC record carries a rua tag. RFC 9989: “If the tag is not provided, Mail Receivers MUST NOT generate aggregate feedback reports for the domain.” Receivers that send reports must support mailto: and should send at least daily.

The report is attached to an email. The XML should be compressed with GZIP, the file extension is xml or xml.gz, and the file name follows the pattern receiver, domain, begin, end, for example:

mail.receiver.example!example.com!1013662812!1013749130.xml.gz

parsedmarc and dmarc-report-converter also read zip files. How to unpack the files and use them to investigate an error such as 5.7.26 is described in SPF passes, but DMARC fails.

What changed between RFC 7489 and RFC 9990?

RFC 7489 (March 2015, category Informational) describes aggregate reports in section 7.2 and the XML schema in Appendix C. The Datatracker lists it as “Obsoleted by RFC 9989, RFC 9990, RFC 9991”. RFC 9990 (DMARC Aggregate Reporting, May 2026, Standards Track) replaces the reporting part; the original document was split into three: RFC 9989 for the mechanism, RFC 9990 for aggregate reports, RFC 9991 for failure reports.

According to Appendix C of RFC 9990, the differences include: elements of the schema are stated more clearly, the report ID has more structure, extensions are possible, and the selector is required when a DKIM signature is reported. Two more show in the schemas:

  • For the SPF scope, the schema of the predecessor RFC 7489 allows helo and mfrom and requires the element; RFC 9990 allows only mfrom and makes the element optional (section 3.1.1.13 and Appendix A).
  • The sample report in RFC 9990 uses the namespace urn:ietf:params:xml:ns:dmarc-2.0, the schema of RFC 7489 http://dmarc.org/dmarc-xml/0.1.

Do the tools read the new schema?

parsedmarc’s documentation lists both schemas as readable and says of the older draft of the 1.0 schema that it is still in wide use.

Whether dmarc-report-converter and dmarcts-report-viewer read the new schema is not stated in their README files; they name no RFC.

How is a report structured?

The root is called feedback. Below it, according to RFC 9990:

  • report_metadata: the name of the reporting organization (org_name), a unique report_id and the reporting period date_range with begin and end as seconds since the epoch.
  • policy_published: information on the published DMARC Policy Record of the author domain, with domain, p, sp, adkim, aspf and further fields.
  • record, at least once: at least one entry per source IP, made up of row, identifiers and auth_results.

How do you read an entry?

row holds source_ip (the connecting IP address) and count (the number of messages to which policy_evaluated was applied). policy_evaluated contains disposition, the result of applying the policy, as well as dkim and spf as the result of the DMARC alignment test. According to the RFC, these two values are the values as they relate to DMARC, not the values the receiver may have used when overriding the policy.

auth_results, by contrast, holds the DKIM and SPF results, “uninterpreted with respect to DMARC”. For DKIM these are domain (the d= of the signature), selector and result. For SPF they are domain, scope and result; DMARC uses only the MAIL FROM identity (RFC 9990, section 3.1.1.13; the difference from the predecessor RFC 7489 is described above). identifiers names header_from (the domain in RFC5322.From) and envelope_from (the domain the SPF check was applied to).

What if auth_results passes and policy_evaluated does not?

The conclusion from these definitions: a DMARC pass requires a passing SPF or DKIM check and, in addition, that the associated domain is aligned with the author domain. Aligned means the same organizational domain in relaxed mode and an identical domain in strict mode. If auth_results shows a pass while policy_evaluated shows a fail, the check passes but the domain that was checked is not aligned.

When does a reason appear, and what can you trust?

If alignment fails and the applied action differs from the published policy, a reason must be present. RFC 9990 lists types including local_policy, mailing_list, policy_test_mode and trusted_forwarder.

The RFC itself names two caveats: data in reports may be forged, and when a policy changes within a reporting period, mixed reports can result.

Which kinds of tools are there?

  • By hand: unpack and format the XML (commands in the article linked above). RFC 9990 calls the XML reports not human readable “in bulk”; a system for reporting, dashboarding or monitoring may help to identify problems.
  • Parser with an evaluation stack: according to its project page, parsedmarc is a Python module and CLI utility for parsing DMARC reports. It can fetch reports from a mailbox over IMAP, Microsoft Graph or the Gmail API, writes JSON or CSV, and can send results to Elasticsearch, OpenSearch, Splunk or PostgreSQL. According to its documentation, the --offline option skips online queries for geolocation and DNS.
  • Converter into readable formats: according to its README, dmarc-report-converter converts reports from XML into human-readable formats and reads .xml, .gz, .zip and .eml. Output formats are html_static, html, txt, json and a custom template. The lookup_addr option performs a reverse lookup of the addresses.
  • Viewer on a database: dmarcts-report-viewer is a PHP viewer for reports that a parser has previously written into a MySQL or PostgreSQL database, according to the README rddmarc or dmarcts-report-parser.pl. It filters reports by result, month, domain and reporting organization and shows the raw XML.
  • Hosted services: RFC 9989 notes that many third-party services process aggregate reports. Domain owners who cannot receive reports themselves for organizational reasons can, according to RFC 9990, direct them exclusively to an external processor.

Is there a tool in the browser?

The tool DMARC RUA Report Viewer reads .xml, .xml.gz and .zip and detects all three by the file’s content, not by name or extension. It runs entirely in the browser, without an upload, does not resolve source IP addresses (no rDNS, no WHOIS, no ASN lookup) and does not merge multiple reports.

Sources

Let's talk

Free initial consultation - no sales pitch, just an honest assessment.

Request a consultation →