How to Read DMARC Aggregate XML Reports: policy_evaluated vs auth_results Triage
Decode gzipped RFC 7489 Appendix C DMARC XML reports without false alarms: why auth_results vs policy_evaluated differ, how to spot spoofers vs forwarders, and fix gaps.
Incident Symptom & RFC 7489 Root Cause
Authentication & Policy Symptom
Opening a raw .xml.gz DMARC aggregate report from noreply-dmarc-support@google.com shows dozens of <record> blocks mixing <spf>fail</spf> inside <policy_evaluated> with <result>pass</result> inside <auth_results>—making it hard to tell genuine shadow-IT SaaS senders apart from harmless email forwarders and malicious phishing bots!
Alignment & Policy Discovery Mechanics
A DMARC <record> contains TWO completely different sections for each IP batch: <auth_results> records raw SPF/DKIM authentication (regardless of domain alignment!), whereas <row><policy_evaluated> records DMARC-aligned <dkim> and <spf> results PLUS any receiver <reason> override (such as forwarded or trusted_arc)!
Broken vs Verified Policy & Header Configuration
<!-- Inside google.com!example.com!1732665600!1732751999.xml: -->
<record>
<row>
<source_ip>149.72.120.45</source_ip>
<count>1840</count>
<policy_evaluated>
<disposition>none</disposition>
<dkim>fail</dkim> <!-- ALIGNED DKIM FAILED! -->
<spf>fail</spf> <!-- ALIGNED SPF FAILED! Will bounce 1,840 emails when p=reject flips! -->
</policy_evaluated>
</row>
<identifiers><header_from>example.com</header_from></identifiers>
<auth_results>
<!-- Raw SPF passed for sendgrid.net, NOT example.com! -->
<spf><domain>em9912.sendgrid.net</domain><result>pass</result></spf>
</auth_results>
</record># Quick CLI summary across local unzipped DMARC XML files using xmllint /xq or Python:
python3 -c '
import glob, gzip, xml.etree.ElementTree as ET
for p in glob.glob("*.xml.gz"):
root = ET.parse(gzip.open(p)).getroot()
org = root.findtext("report_metadata/org_name")
for r in root.findall("record"):
ip = r.findtext("row/source_ip")
n = r.findtext("row/count")
dk = r.findtext("row/policy_evaluated/dkim")
sp = r.findtext("row/policy_evaluated/spf")
spf_dom = r.findtext("auth_results/spf/domain")
if dk == "fail" and sp == "fail":
print(f"FAIL [{org}] count={n} ip={ip} raw_spf_domain={spf_dom}")
'
# Bucket 1 (raw_spf_domain is a known SaaS ESP like sendgrid.net / hubspotemail.net / zendesk):
# -> Legitimate unaligned shadow IT! Enable custom DKIM (d=example.com) in that SaaS dashboard!
# Bucket 2 (<policy_evaluated><dkim>pass</dkim><spf>fail</spf>):
# -> Already PASSES DMARC (normal auto-forwarded mail or unaligned Return-Path rescued by DKIM)!
# Bucket 3 (Unknown residential/VPS IPs, raw_spf=fail/softfail, raw_dkim=none):
# -> Actual spoofers! Safe and intended to be blocked by p=reject!Protocol Mechanics & Operational Deep Dive
Every <record> element inside an RFC 7489 XML aggregate report summarizes all messages received from a single <source_ip> with identical alignment outcomes during a 24-hour window (<count>). Ignore <auth_results> until AFTER you check <row><policy_evaluated>! Remember the golden rule: if <policy_evaluated><dkim>pass</dkim> OR <policy_evaluated><spf>pass</spf> is pass, DMARC PASSED for all <count> messages in that row! You only have an incident risk when BOTH <policy_evaluated><dkim> AND <policy_evaluated><spf> equal fail!
Once you filter down strictly to rows where BOTH aligned <dkim>fail</dkim> and aligned <spf>fail</spf> occurred, inspect <auth_results> and reverse DNS (dig -x <source_ip>) to classify each row into one of three operational buckets: Bucket A (Misconfigured Legitimate SaaS): <auth_results><spf><domain> shows a recognizable ESP (amazonses.com, mcsv.net Mailchimp, hubspotemail.net, freshdesk.com) with <result>pass</result>—someone in Marketing, Support, or HR connected a tool to From: @example.com without verifying custom DKIM CNAMEs! Fix by adding custom 2048-bit DKIM for example.com inside that SaaS tool. Bucket B (Indirect Mailing List / Forwarder): <policy_evaluated><reason><type> shows forwarded, mailing_list, or local_policy (arc=pass), or PTR points to .edu / protection.outlook.com / google.com forwarding relays.
Bucket C (External Phishing / Spoofing Botnets): <source_ip> resolves to random cloud VPSs, compromised consumer broadband IPs, or bulletproof hosts across dozens of ASNs with <auth_results> showing dkim=none and spf=fail/softfail for example.com. Bucket C is the exact malicious traffic DMARC was built to destroy—seeing Bucket C fail is proof you SHOULD advance to p=reject, never a reason to stay on p=none! If manually parsing gzipped XML attachments every week slows down your team, pair your rua= address with a visual DMARC analyzer (such as EasyDMARC or Postmark DMARC Digests) alongside self-hosted backups.
DMARC XML <record> Diagnostic Decision Matrix
| Policy / Scenario | RFC 7489 Evaluation | Production Remediation |
|---|---|---|
| policy_evaluated: dkim=pass, spf=fail | DMARC PASS! Either forwarded mail (where DKIM survived) or ESP using unaligned Return-Path. | No emergency; optionally add custom Return-Path subdomain on ESP for dual SPF+DKIM alignment. |
| policy_evaluated: dkim=fail, spf=pass | DMARC PASS today, BUT fragile! Will fail DMARC whenever forwarded by a recipient! | Investigate why DKIM is missing, 1024-bit expired, or unaligned on that legitimate sender IP! |
| Both fail + auth_results shows ESP domain (mcsv.net / sendgrid.net) | DMARC FAIL! Legitimate shadow-IT SaaS tool sending as @example.com without custom alignment. | Track down SaaS owner internally and configure custom DKIM CNAMEs BEFORE enabling p=reject! |
| Both fail + random IPs + auth_results dkim=none, spf=fail | Unauthorized spoofing / phishing attempts impersonating your domain. | Expected noise! Move policy from p=none -> p=quarantine -> p=reject to block them. |
Edge Cases & Engineering FAQs
Why do DMARC XML filenames use '!' vs ',' and combine .xml.gz vs .zip?
Per RFC 7489 §7.2.1.1, report filenames follow the convention receiver-domain!policy-domain!begin-epoch!end-epoch.xml.gz (or .zip): Google and Yahoo typically attach gzip (.xml.gz), whereas Microsoft/Enterprise gateways often attach PKZIP (.zip). Any automated parser must detect both gzip (magic 1f 8b) and zip (magic 50 4b) headers!
Why does <envelope_from> sometimes appear missing in Google's DMARC XML reports?
Some receivers omit <identifiers><envelope_from> for privacy or brevity and report the evaluated SPF domain inside <auth_results><spf><domain> instead—always check <auth_results><spf><domain> when <envelope_from> is absent.
Is it safe to attach raw DMARC XML files to engineering Jira tickets or Slack channels?
Yes! Unlike ruf forensic failure samples (which can contain message headers/subjects), rua aggregate XML reports contain ONLY aggregate IP counts, domain names, selector names, and pass/fail booleans—zero recipient email addresses and zero message body content!
Aggregate RUA Report Analytics
Automated XML aggregate report ingestion and dynamic SPF flattening to stay under the 10-lookup ceiling without stale netblocks.