Blog
SavedSearch
Visit Hostlelo

Read Your First DMARC Aggregate Report, Line by Line

DMARC reports arrive as compressed XML that few people read. Learn to unpack one, read each record, find senders that fail alignment, and plan your next policy.

The short answer

A DMARC aggregate report is a daily XML summary from a mail receiver that lists every IP address that sent mail as your domain, how many messages each sent, and whether SPF and DKIM passed in alignment with your From domain. Unpack the gzip attachment, confirm the policy the receiver saw, then check each record: a message passes DMARC if either the DKIM or SPF result says pass. Fix every source you recognise that fails, and only then move from p=none toward quarantine, after at least a month of monitoring as RFC 9989 suggests.

DMARC XML report being inspected through a magnifier before authentication and safe parsing
Reading options

On this page

Before you start

A DMARC aggregate report from a sender you can verify; Python 3 in an isolated environment; the reviewed defusedxml package; a non-production working directory; permission to inspect the report.

A DMARC aggregate report is an XML file that mail receivers send you, usually daily, listing every server that sent mail as your domain and whether that mail passed SPF and DKIM in a way that matches your domain. You read it by unpacking the attachment, checking the policy the receiver saw, and then going through each record, which pairs a sending IP and a message count with a pass or fail. Any source you recognise that fails needs fixing before you tighten your policy.

Here is the usual scene. A week after setting up DMARC, your inbox fills with subjects like Report Domain: example.com Submitter: mail.receiver.example and an attachment with a long name full of ! characters. You open one, see a wall of XML, and close it. The rules also changed this year: in May 2026 the IETF published RFC 9989 and RFC 9990, replacing the RFC 7489 that most guides still quote.

By the end, you will unpack a report, read every line that matters, find the failing senders, and know when to move from p=none toward p=quarantine.

What a DMARC report actually is

Think of it as a monthly bank statement from a bank you did not know was processing payments in your name. Most lines are yours and look fine. Now and then there is a line you have never seen before, which is exactly why you wanted the statement.

An aggregate report is a summary, not a copy of your emails. It counts messages by sending IP and result, and RFC 9990 says it "does not contain any identifying characteristics about individual users".

Two checks sit under every line. SPF (Sender Policy Framework) is a DNS record listing which servers may send mail for a domain. DKIM (DomainKeys Identified Mail) is a signature your mail server adds to each message, checked against a public key in your DNS.

The last idea is alignment: the domain that passed SPF or DKIM must match the domain in the visible From address. Mail can pass SPF for some other domain and still fail DMARC. In the default relaxed mode, sharing the main domain is enough, so news.example.com aligns with example.com.

Before you start

You need very little.

  • A DMARC record already published for your domain, with an rua tag pointing to a mailbox you can read
  • Access to your DNS panel, only to look at the record
  • A plain text editor
  • A gzip tool (built into Linux and macOS) or a Windows archive tool that opens .gz files
  • python3 for the optional summary script
  • About 30 minutes for the first report, 5 to 10 minutes after that
  • Risk level: low, because reading reports changes nothing

If you have not set up SPF, DKIM and DMARC yet, do that first with our SPF, DKIM and DMARC setup guide for small business email, then come back here.

What changed in 2026

Older guides and many live records still show tags the new standard dropped. At the time of writing (20 November 2026), this is where things stand.

  • RFC 9989, a Proposed Standard from May 2026, is the main DMARC standard. It obsoletes RFC 7489 and RFC 9091.
  • RFC 9990 defines aggregate reports, and RFC 9991 is the companion for failure reports.
  • The pct tag is removed. In RFC 7489 it defaulted to 100 and applied your policy to a percentage of failing mail.
  • The ri tag (report interval, old default 86400 seconds) and the rf tag are removed too.
  • A new t tag means testing mode, with a default of n.
  • New reports use the XML namespace urn:ietf:params:xml:ns:dmarc-2.0, and DKIM results must include the selector.

RFC 9989 explains: "Operational experience showed that the "pct" tag was usually not accurately applied, unless the value specified was either 0 or 100 (the default)". The registry now lists all three removed tags as historic.

Heads up: the t tag does not change your reports. RFC 9989 says: "This tag does not affect the generation of DMARC reports, and it has no effect on any policy ("p", "sp", or "np") that is "none"." So t=y on a p=none record does nothing.

Read your first report

Step 1: Find the report address in your record

Your DMARC record is a TXT record at the name _dmarc in front of your domain. This command asks DNS for it, so you can confirm where reports go.

dig TXT _dmarc.example.com +short

You should see one quoted line that starts with v=DMARC1. The part after rua=mailto: is the mailbox that receives reports.

On Windows, or anywhere without dig, this command does the same lookup.

nslookup -type=TXT _dmarc.example.com

Look for the same v=DMARC1 text in the answer. If there is no rua tag, RFC 9989 says receivers "MUST NOT generate aggregate feedback reports for the domain".

Step 2: Find the report email and unpack it

Open the mailbox named in rua and search for Report Domain:, the fixed subject start RFC 9990 sets. Reports are "daily (or more frequent)", each typically covering one UTC day.

The attachment is usually gzip compressed, and its name follows a pattern: receiver, your domain, start time, end time. Save it, then run this command to unpack it while keeping the original. The file name is the example from RFC 9990.

gzip -dk 'mail.receiver.example!example.com!1013662812!1013749130.xml.gz'

You should now have a file with the same name ending in .xml. Nothing is printed when it works.

Quick tip: keep the single quotes. The ! character has a special meaning in many shells, and quotes protect it.

The two long numbers are Unix timestamps, in seconds since 1 January 1970 UTC. The first one here falls on 14 February 2002, and a real report shows a recent date.

Step 3: Read the top of the report

Open the .xml file in your editor. The first block, report_metadata, says who sent the report and which time window it covers. The second, policy_published, shows the DMARC record the receiver saw.

<report_metadata>
  <org_name>Sample Reporter</org_name>
  <date_range>
    <begin>1013662812</begin>
    <end>1013749130</end>
  </date_range>
</report_metadata>
<policy_published>
  <domain>example.com</domain>
  <p>none</p>
  <testing>n</testing>
</policy_published>

The domain should be yours, and p should match what dig showed. The begin and end values tell you which day the counts belong to.

Why this matters: a p that differs from your live record means the receiver saw an older version. RFC 9990 warns reports can mix old and new policy during a change.

A testing value of y means your record has t=y. An error element in the metadata means the receiver had trouble reading your record, for example an invalid rua.

Step 4: Read each record

Next come one or more record blocks, each a group of messages from one IP with the same results.

<record>
  <row>
    <source_ip>203.0.113.25</source_ip>
    <count>12</count>
    <policy_evaluated>
      <disposition>none</disposition>
      <dkim>fail</dkim>
      <spf>fail</spf>
    </policy_evaluated>
  </row>
  <identifiers>
    <header_from>example.com</header_from>
    <envelope_from>bounces.example.net</envelope_from>
  </identifiers>
  <auth_results>
    <dkim>
      <domain>example.net</domain>
      <selector>s1</selector>
      <result>pass</result>
    </dkim>
    <spf>
      <domain>bounces.example.net</domain>
      <result>pass</result>
    </spf>
  </auth_results>
</record>

Read it from the top.

  • source_ip is the server that handed the mail to the receiver.
  • count is how many messages came from it with these exact results.
  • disposition is what the receiver did. Under p=none it shows none, meaning no DMARC action.
  • dkim and spf inside policy_evaluated are the DMARC results. RFC 9990 describes each as "The result of the DKIM DMARC Identifier Alignment test" or the SPF equivalent, so pass here means passed and aligned.
  • header_from is the domain your recipients see in the From line.
  • envelope_from is the hidden bounce address domain that SPF checks.
  • auth_results holds the raw SPF and DKIM results, which RFC 9990 describes as "uninterpreted with respect to DMARC".

Made-up example: this is a newsletter tool before proper setup. SPF passed for bounces.example.net and DKIM passed for example.net. Neither matches example.com, so both DMARC results are fail.

Step 5: Spot the alignment failures

A message passes DMARC if either dkim or spf inside policy_evaluated says pass. Records where both say fail are the ones to chase first.

Sort each failing record into one of these groups.

  • Your own server, misconfigured. Fix SPF or DKIM for it.
  • A service you use. A newsletter tool, helpdesk or invoicing app sending as your domain. Set up its SPF include or DKIM signing with your domain.
  • A forwarder or mailing list. Mail someone else passed on, covered under troubleshooting below.
  • Nobody you know. Possibly someone spoofing your domain. This is the mail p=quarantine and p=reject exist to stop.

A reverse DNS lookup is a good first step to find who owns an IP. This command prints the host name for an address, if one is set.

dig -x 203.0.113.25 +short

A host name containing your provider's name points straight to the owner. No answer is common and just means asking your providers.

Then compare auth_results with the DMARC results. Raw pass with DMARC fail is an alignment problem: the service must use your domain. Raw fail means the SPF record or DKIM signature itself is broken.

Step 6: Summarise every report with a small script

Reading by hand is fine for one report, but RFC 9990 says the XML format is not human-readable in bulk. Treat every attachment as untrusted until you have confirmed the sender and file type. Python's security documentation warns that attacker-controlled XML can consume excessive CPU or memory, and that compressed XML can be a decompression bomb.

The unexecuted example below uses the third-party defusedxml parser and rejects any report that expands past 25 MiB. The 25 MiB ceiling is an author-proposed safety boundary, not an RFC limit; adjust it only after checking the size of reports from providers you trust.

Install defusedxml in an isolated virtual environment or through your operating system's reviewed package process. Then save the following as dmarc_summary.py in a folder containing only reports you intend to inspect.

import gzip
import sys
from defusedxml import ElementTree as DET

MAX_BYTES = 25 * 1024 * 1024


def local(tag):
    # Drop the "{namespace}" prefix so old and new reports both work.
    return tag.rsplit("}", 1)[-1]


def child(parent, name):
    if parent is None:
        return None
    for element in parent:
        if local(element.tag) == name:
            return element
    return None


def text(parent, name, default="-"):
    element = child(parent, name)
    if element is None or element.text is None:
        return default
    return element.text.strip()


def read_limited(path):
    opener = gzip.open if path.endswith(".gz") else open
    with opener(path, "rb") as handle:
        data = handle.read(MAX_BYTES + 1)
    if len(data) > MAX_BYTES:
        raise ValueError("report exceeds the 25 MiB decompressed safety limit")
    return data


def main():
    if len(sys.argv) != 2:
        print("Usage: python3 dmarc_summary.py REPORT.xml (or .xml.gz)")
        sys.exit(1)

    root = DET.fromstring(read_limited(sys.argv[1]))
    meta = child(root, "report_metadata")
    policy = child(root, "policy_published")
    print("Reporter:", text(meta, "org_name"))
    print("Domain:", text(policy, "domain"), "| p =", text(policy, "p"))
    print()
    print(f"{'source_ip':<40} {'count':>7}  {'dkim':<5} {'spf':<5} disposition")

    records = messages = failing = 0
    for record in root:
        if local(record.tag) != "record":
            continue
        row = child(record, "row")
        evaluated = child(row, "policy_evaluated")
        ip = text(row, "source_ip")
        count = int(text(row, "count", "0"))
        dkim = text(evaluated, "dkim")
        spf = text(evaluated, "spf")
        disposition = text(evaluated, "disposition")
        print(f"{ip:<40} {count:>7}  {dkim:<5} {spf:<5} {disposition}")
        records += 1
        messages += count
        if dkim != "pass" and spf != "pass":
            failing += count

    print()
    print(f"Records: {records}  Messages: {messages}  Failing DMARC: {failing}")


if __name__ == "__main__":
    main()

The parser blocks dangerous XML constructs, while read_limited caps the decompressed bytes before parsing. The local function strips the namespace used by newer reports. A safety check does not prove the report is authentic: verify the sender independently, do not follow links in an unexpected report, and discard malformed or suspicious attachments.

Step 7: Decide the next policy step

p=none is called monitoring mode: you collect reports and nothing else. RFC 9989 says the reason to start there "is to ensure that nothing's been missed in the initial SPF and DKIM deployments."

This timeline uses only what the RFCs say. Stretch it if your domain sends little mail.

  1. Stay at p=none until every source you recognise passes. RFC 9989 says this "may take many months" for some domains.
  2. Keep p=none for at least a month either way. For domains whose users post to mailing lists, RFC 9989 recommends "first by publishing p=none for at least a month, followed by publishing p=quarantine for an equally long period of time, and comparing the message disposition results."
  3. Move to p=quarantine once only unknown sources fail. Keep reading reports for at least another month.
  4. Consider p=reject last. RFC 9989 says domains with p=reject "MUST NOT rely solely on SPF to secure a DMARC pass and MUST apply valid DKIM signatures to their messages."

For a softer step, p=quarantine; t=y asks receivers to apply one level lower, so failing mail gets none treatment. At the time of writing (20 November 2026), we could not confirm which large receivers act on the t tag yet, so treat it as a request.

Reading the record in a DNS panel

Every DNS panel looks different, but a DMARC record always has the same parts. Open the TXT records list and look for these fields.

  • Name or Host: _dmarc. Some panels want the full name, _dmarc.example.com, and some add the domain for you.
  • Type: TXT.
  • Value or Content: the tag list, starting with v=DMARC1.

Read the value as tag=value pairs separated by semicolons. v=DMARC1 must come first, or the whole record is ignored. p is your policy and rua is where reports go. adkim and aspf set alignment mode, and both default to r, meaning relaxed. A pct=100 or ri=86400 in an old record is a historic tag the new standard no longer uses.

This is a complete starting record with example values. It asks for reports and nothing else.

_dmarc.example.com.  3600  IN  TXT  "v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com"

The difference between p=none and p=quarantine is what you ask receivers to do with mail that fails DMARC. With none, RFC 9989 says "The Domain Owner offers no expression of preference." With quarantine, you call such mail "suspicious". RFC 9989 also says that messages failing under a quarantine or reject policy "will not reach the inbox at Mail Receivers that participate in DMARC and honor the Domain Owner's expressed handling preference". Reports arrive the same way under both.

Heads up: if your rua address is on another domain, such as a report service, that domain must publish an authorisation record. RFC 9990 Section 4 describes a TXT record at a name like example.com._report._dmarc.thirdparty.example.net containing v=DMARC1;. Without it, receivers must ignore the address.

How to check it worked

First confirm the record is live. Run this again after any change.

dig TXT _dmarc.example.com +short

The expected output is one line, and it must start with v=DMARC1.

"v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com"

Next, run the script on a real report. This command reads the compressed file directly, with no unpacking needed.

python3 dmarc_summary.py 'mail.receiver.example!example.com!1013662812!1013749130.xml.gz'

With a small test report of three records, the output looks like this. Your IPs and counts will differ.

Reporter: Sample Reporter
Domain: example.com | p = none

source_ip                                  count  dkim  spf   disposition
192.0.2.10                                    48  pass  pass  none
203.0.113.25                                  12  fail  fail  none
2001:db8::10                                   3  pass  fail  none

Records: 3  Messages: 63  Failing DMARC: 12

The Records number should match the record blocks in the file. This command counts them, even in a one-line file.

grep -o '<record>' 'mail.receiver.example!example.com!1013662812!1013749130.xml' | wc -l

Here 192.0.2.10 is healthy, 203.0.113.25 fails both and needs an owner, and 2001:db8::10 passes on DKIM alone, which still counts as a DMARC pass and often means forwarding.

Troubleshooting

No reports are arriving

  • Symptom: a week after publishing the record, the mailbox in rua is empty.
  • Cause: a typo in the record, a wrong rua address, an external address without authorisation, reports filtered as spam, or too little mail for anyone to report on.
  • Fix: run the dig check and read rua letter by letter. Search spam for Report Domain:. Reports are typically daily, so wait at least 48 hours.

gzip says "not in gzip format"

  • Symptom: running gzip -dk prints gzip: fake.xml.gz: not in gzip format with your file name.
  • Cause: the file is not gzip data. It may already be unpacked, or the sender sent plain XML, which RFC 9990 allows with the .xml extension.
  • Fix: open it in your editor. If it starts with <?xml or <feedback, it is already readable. A name ending in .zip is a zip archive, which neither RFC defines, so open it with unzip or your archive tool.

The script stops with an XML parse error

  • Symptom: the script ends with an XML parse error such as unclosed token: line 45, column 4 or no element found: line 1, column 0.
  • Cause: the file is truncated or empty, usually from an interrupted download or save.
  • Fix: save the attachment again from the original email and rerun. RFC 9990 says a report that does not match the format should be discarded, so do not repair it by hand.

Your own mail server fails alignment

  • Symptom: an IP you know belongs to your server or host shows fail for both dkim and spf.
  • Cause: the server is missing from your SPF record, or it signs DKIM for another domain or not at all. auth_results shows which domain each check used.
  • Fix: add the right include or ip4 entry to your SPF record, and turn on DKIM signing with your own domain for that sender. Then watch the next reports for that IP to show pass.

Forwarded or mailing list mail fails

  • Symptom: an unknown IP shows spf as fail, sometimes dkim too, and a reason element may show mailing_list or trusted_forwarder.
  • Cause: forwarders resend your mail from their own servers, so SPF fails, though RFC 9989 notes "DKIM signatures will generally remain valid in these relay situations." Mailing lists are harder: RFC 7960 says they "very commonly modify headers or message content in ways that will cause DKIM to fail", for example by adding a subject tag or a footer.
  • Fix: make sure every message you send carries a valid aligned DKIM signature, since that is what survives forwarding. You cannot fix other people's lists, so note these sources and think hard about p=reject if your team posts to lists.

Pro tips and security notes

Never paste a full report into a public forum or chat group. RFC 9990 says reports contain no personal information such as IP addresses of individuals, but they still map every server and service that sends for your domain, and for a host or agency those IPs can belong to customers. Share only the lines you need help with, and swap real IPs for documentation addresses like 192.0.2.10.

Keep p=none for a monitoring period, not forever. The only period we could verify is RFC 9989's: at least a month at p=none, then as long at p=quarantine. Put the review date in your calendar.

Quick tip: each receiver sends its own report, so save the script output into one text file per month. Those summaries are your history.

The one message worth forwarding

If a failing sender is run by someone else, such as a developer, host or vendor, this message gives them what they need.

Hi, our DMARC reports show mail sent as example.com from 203.0.113.25 failing alignment. SPF passes for bounces.example.net and DKIM passes for example.net, but neither matches our From domain, example.com. Could you sign this mail with DKIM using d=example.com (send us the DNS record to publish), or use a bounce address under example.com covered by our SPF record? We are at p=none and plan to move to p=quarantine soon. Thanks.

Read one report today, line by line, and you will know more about who sends as your domain than most domain owners ever do.

Reader questions

Why do I get reports from companies I have never emailed?

Reports come from any mail receiver that got mail using your domain in the From address and supports DMARC reporting. If someone spoofs your domain, the receivers they targeted can report that traffic to you too, which is one of the main reasons the reports exist.

Can I send DMARC reports to more than one address?

Yes. RFC 9989 defines the rua tag as a comma-separated list of reporting URIs, so you can list two mailto addresses. Any address outside your own domain needs an authorisation record published by that other domain.

Are failure reports the same as aggregate reports?

No. Aggregate reports are daily summaries of counts and results, while failure reports, defined in RFC 9991, give details about individual messages that failed DMARC. Failure reports are requested with a separate ruf tag, and not every receiver sends them.

What does a disposition of pass mean in a report?

The RFC 9990 schema lists pass as a disposition meaning no action was taken because the mail passed DMARC while an enforcing policy was published. Under p=none you will normally see none instead.

Why does the same IP address appear in several records?

Each record groups messages that share one IP address and one set of results and identifiers. If some mail from that server passed and some failed, or used different From or bounce domains, the receiver lists them as separate records.

Do aggregate reports cover my subdomains?

Yes, if a subdomain has no DMARC record of its own. RFC 9990 explains that its mail appears as extra records inside the report for the parent domain, while a subdomain with its own DMARC record gets its own separate report.

How long should I keep the raw XML files?

RFC 9990 notes that once the data is extracted and indexed, the reports seemingly have little value in most situations. Keeping your parsed summaries and a few months of raw files is usually enough for a small business.

Sources & further reading

  1. RFC 9989, DMARC (info page)
  2. RFC 9989, DMARC (full text)
  3. RFC 9990, DMARC Aggregate Reporting (info page)
  4. RFC 9990, DMARC Aggregate Reporting (full text)
  5. RFC 9991, DMARC Failure Reporting (info page)
  6. RFC 7489, original DMARC, now obsolete
  7. RFC 7960, DMARC and indirect email flows
  8. Python docs, xml.etree.ElementTree
  9. Python docs, gzip module
  10. GNU gzip manual
  11. Python 3 XML security documentation
  12. defusedxml project documentation

What changed

Replaced direct parsing of email-supplied XML with a hardened, size-bounded example; added sender/attachment checks, labelled the 25 MiB cap as author-proposed, and added original article/social media.

Originally published . About our editorial updates.

Your next project deserves a better foundation.

Explore hosting built for your next chapter.

Explore hosting

Find your next answer.

Search published guides and articles.

Ctrl / ⌘ K to open · Esc to close