Reading DMARC aggregate reports and fixing mail that lands in spam: from p=none to reject

  1. Introduction
  2. What an aggregate report looks like
  3. The process of tightening the policy
  4. Step 1: observe with `p=none`
  5. Step 2: classify each source
  6. Step 3: move to `quarantine` gradually
  7. Step 4: `reject` once you are sure
  8. When legitimate mail lands in spam
  9. Common mistakes
  10. Summary
  11. References

Introduction

The previous article set up a DMARC record with p=none and a rua address. After a few days, that mailbox starts receiving strange attachments.

This article shows how to read them, use them to find forgotten or spoofed sources, and tighten the policy step by step.

It continues the article “SPF, DKIM and DMARC: three DNS records that prove mail comes from your domain”; this is the last article in the series.

It is based on RFC 7489.

The IETF has worked on a revision of this specification (often called DMARCbis); check the latest status on the RFC site or the IETF Datatracker, since the basic tags used in this article are the widely deployed part.

What an aggregate report looks like

Large receiving servers send aggregate reports about once a day, usually as an XML file compressed with gzip or zip attached to an email.

A report contains no message content, only statistics per source IP address.

Decompress and open the file in a text editor. On Ubuntu 24.04:

gunzip report.xml.gz        # for a .gz file
unzip report.zip            # for a .zip file (the unzip package)

A typical structure (shortened, using example addresses):

<feedback>
  <report_metadata>
    <org_name>Example Receiver</org_name>
    <report_id>123456</report_id>
    <date_range><begin>1700000000</begin><end>1700086400</end></date_range>
  </report_metadata>
  <policy_published>
    <domain>example.com</domain><p>none</p>
  </policy_published>
  <record>
    <row>
      <source_ip>192.0.2.10</source_ip>
      <count>120</count>
      <policy_evaluated><disposition>none</disposition><dkim>pass</dkim><spf>pass</spf></policy_evaluated>
    </row>
    <identifiers><header_from>example.com</header_from></identifiers>
    <auth_results>
      <dkim><domain>example.com</domain><selector>s2026</selector><result>pass</result></dkim>
      <spf><domain>example.com</domain><result>pass</result></spf>
    </auth_results>
  </record>
</feedback>

The parts to read:

Raw XML is hard to read when there are many sources.

You can use an open-source DMARC report analyser or an existing service; since reports contain the IP addresses that send your mail, consider how much you trust a service that receives the data.

The process of tightening the policy

The process of tightening the policy

Step 1: observe with `p=none`

Leave p=none for at least a few weeks to see the full sending cycle (periodic mail at month end, invoices, newsletters). Group the record lines by source_ip.

Step 2: classify each source

For each IP, answer:

Yours and passing both

nothing to do.

Yours but failing

for example an application server not yet in SPF, or a mail-sending service not yet signing with your domain. Fix SPF (include or ip4) or enable a custom-domain DKIM at the provider.

You can look up the owner of an IP with whois (the whois package) or ask the team that runs the application.

Not yours

most likely spoofing or forwarded mail. This is exactly the kind of mail that quarantine and reject are designed to stop.

Watch for two cases that cause "false positives": forwarded mail (SPF breaks because the forwarding machine has a different IP) and mailing lists (which may modify headers or the body and break the DKIM signature).

So a little legitimate mail failing DMARC is normal; RFC 8617 (ARC) is a mechanism built to help intermediaries preserve the original authentication results, but adoption depends on each receiver.

Step 3: move to `quarantine` gradually

When all legitimate sources pass, change the policy to quarantine, starting with a small percentage:

_dmarc.example.com.  IN TXT  "v=DMARC1; p=quarantine; pct=10; rua=mailto:[email protected]"

Increase pct gradually (for example 10, 25, 50, 100) and keep reading the reports after each increase.

If something goes wrong, go back to p=none immediately; since DNS has a TTL, set a low TTL on the DMARC record during this phase.

Step 4: `reject` once you are sure

Move to p=reject only when several weeks of reports in a row show no legitimate source failing.

Do not forget sp= if subdomains also send mail, and set a policy for domains that do not send mail (for example spare registered domains) to block spoofing of them.

When legitimate mail lands in spam

DMARC is only one of many signals. The debugging process:

  1. Take one specific message that landed in spam and open "View source".

  2. Read Authentication-Results. If SPF, DKIM or DMARC is not pass, go back to the previous article and fix the corresponding record.

  1. If all three pass and the message still lands in spam, the cause is usually outside authentication: the reputation of the sending IP or domain, recipients marking mail as junk,

  1. content that looks like advertising, suspicious shortened links, or a sudden large volume from a new domain.

  1. Check whether the sending IP is on public blocklists, and the mailbox provider's feedback-loop service if they offer one.

  1. For bulk mail, provide a clear way to unsubscribe.

  1. Some large mailbox providers have published authentication requirements and spam-rate limits for high-volume senders; read the official sender guidelines of each provider you send to.

Common mistakes

Summary

DMARC aggregate reports give you a map of every place that sends mail on behalf of your domain.

Read them, fix the legitimate sources that still fail, then tighten the policy from none to quarantine and reject in small, reversible steps.

When a specific message lands in spam, start from Authentication-Results and only then consider reputation and content.

References

Reading DMARC aggregate reports and fixing mail that lands in spam: from p=none to reject