Transform DMARC reports into HTML
[Intro] [XSL stylesheet]


Domain owners can view how well or bad their DKIM/SPF settings are doing with mail sent to some sites. That is called DMARC: Domain-based Message Authentication, Reporting & Conformance. See RFC 7489.

By setting an adequate DMARC record, a postmaster can receive daily reports from a number of mail sites. Reports consist of a [g]zipped xml file. Reports guide domain owners in their choice of DMARC policy and DKIM signing.

This XSLT transform adds to each message an HTML section like the one shown beside, which displays the content of the XML aggregate report in tabular form.

A domain with no human users could set p=quarantine or p=reject instead of p=none. The problem with human users is that they may engage in indirect mail flows, such as mailing lists. But there is work in progress...

XSL stylesheet

XML reports are handy for a number of tasks, except reading them. Having a look to those reports, dayly, time permitting, can improve insight. This is where XSL Transformations may help.

zero rights

Copy and paste the script using your editor of choice. You may want to customize the default value of the source_ip_href parameter.

The report has to be extracted from mail messages, of course. I had set up set up a Perl utility which can be invoked by maildrop's xfilter, but after years of casual maintenance it's become rather goofy.