I receive Google's DMARC reports daily as a zip file containing an XML file. I manually download each zip file ~/Documents/DMARC
.
I want to aggregate the information from all the saved DMARC reports and produce a human-readable readable report (e.g. table in LibreOffice Calc spreadsheet). I am on Ubuntu 20.04 standard desktop, so I would rather not have memory-hungry or CPU-hungry services running all the time.
Any suggestions on how to do this?
Background Info
Domain-based Message Authentication, Reporting and Conformance (DMARC) is an evolving technical standard and the DMARC report format is specified by that standard. It also looks like Ubuntu will natively support DMARC from 21.04 onwards, but not in 20.04.
The Google link above shows samples of input DMARC XML file format and an output tabular form. As requested, they are pasted here.
Sample input XML file:
<?xml version="1.0" encoding="UTF-8" ?>
<feedback>
<report_metadata>
<org_name>solarmora.com</org_name>
<email>[email protected]</email>
<extra_contact_info>http://solarmora.com/dmarc/support</extra_contact_info>
<report_id>9391651994964116463</report_id>
<date_range>
<begin>1335571200</begin>
<end>1335657599</end>
</date_range>
</report_metadata>
<policy_published>
<domain>bix-business.com</domain>
<adkim>r</adkim>
<aspf>r</aspf>
<p>none</p>
<sp>none</sp>
<pct>100</pct>
</policy_published>
<record>
<row>
<source_ip>203.0.113.209</source_ip>
<count>2</count>
<policy_evaluated>
<disposition>none</disposition>
<dkim>fail</dkim>
<spf>pass</spf>
</policy_evaluated>
</row>
<identifiers>
<header_from>bix-business.com</header_from>
</identifiers>
<auth_results>
<dkim>
<domain>bix-business.com</domain>
<result>fail</result>
<human_result></human_result>
</dkim>
<spf>
<domain>bix-business.com</domain>
<result>pass</result>
</spf>
</auth_results>
</record>
</feedback>