# 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.

- **Canonical URL**: https://opslint.dev/dmarc/dmarc-aggregate-xml-report-disposition-triage/
- **Category**: `DMARC`
- **Interactive Workbench**: [Open in Live Workbench](https://opslint.dev/dmarc/#domain=microsoft.com)
- **Normative Specifications**: `RFC 7489 Appendix C (DMARC XML Aggregate Report Schema)`, `RFC 7489 §7.2 (Aggregate Reports: policy_evaluated, PolicyOverrideReason, auth_results)`

## Incident Symptom & Root Cause

**Production 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!

**Protocol / Engine Root Cause**: 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)!

## Remediation Diff (Broken vs Verified Fix)

### Misreading Raw <auth_results> Pass as DMARC Pass (Classic XML Triage Error!)

```text
<!-- 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>
```

### 3-Bucket Triage Command & Remediation Decision Flow

```text
# 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!
```

## Engineering 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

| Case / Engine | Protocol Behavior | Production Remediation |
| :--- | :--- | :--- |
| **policy_evaluated: dkim=pass, spf=fail** (`#xml-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** (`#xml-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)** (`#xml-both-fail-known-esp`) | 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** (`#xml-both-fail-botnet`) | Unauthorized spoofing / phishing attempts impersonating your domain. | Expected noise! Move policy from p=none -> p=quarantine -> p=reject to block them. |

## Frequently Asked Engineering Questions

### 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!

## Related Problem-Cluster Guides

- [Fix Missing DMARC Aggregate Reports: External rua Destination _report._dmarc Authorization](https://opslint.dev/dmarc/external-destination-rua-report-dmarc-authorization/) — Why Gmail, Yahoo, and Microsoft silently drop DMARC rua/ruf XML reports sent to another domain, and how to publish RFC 7489 §7.1 _report._dmarc TXT records.
- [DMARC Rollout Playbook: p=none -> quarantine -> reject and How pct= Actually Works](https://opslint.dev/dmarc/gradual-rollout-p-none-quarantine-reject-pct-tag/) — Execute a zero-outage DMARC enforcement rollout from p=none to p=reject, and avoid the dangerous myth that pct=10 on p=reject drops unthrottled messages to None.
- [DMARC Identifier Alignment Explained: SPF Pass + DKIM Pass Can Still Fail DMARC!](https://opslint.dev/dmarc/identifier-alignment-spf-dkim-relaxed-vs-strict/) — Why emails with spf=pass and dkim=pass still bounce with dmarc=fail when Return-Path or DKIM d= domains don't align with From:, plus aspf=r/s and adkim=r/s rules.
- [Why Email Forwarding & Mailing Lists Break SPF/DKIM under DMARC p=reject (SRS, DKIM & ARC)](https://opslint.dev/dmarc/mailing-lists-forwarding-arc-spf-breakage/) — Understand how auto-forwarding breaks SPF and how mailing lists break DKIM signatures under DMARC p=reject, plus SRS, relaxed DKIM canonicalization, and RFC 8617 ARC.
