# DMARC Reports

Source: https://molted.email/docs/dmarc

Route DMARC aggregate reports to Molted, then view and summarize authentication health per domain.

DMARC aggregate reports are XML files that receiving mail servers send to your `rua` address. They show which messages passed or failed SPF, DKIM, and DMARC alignment checks, and which IPs are sending as you.

Point your `rua=` at Molted and reports are parsed and stored automatically. You can also upload a file by hand.

## Point your rua at Molted

Publish a DMARC record on the domain you send from:

```txt title="DNS record"
_dmarc.notifications.yourcompany.com.  TXT  "v=DMARC1; p=none; rua=mailto:dmarc@agent.molted.email"
```

The exact record for each of your domains is shown under **DMARC reporting** on that domain's DNS page in the portal (`/app/dns/<domainId>`), ready to copy, and in the `dmarc` object of every domain response (see [Domains](https://molted.email/docs/domains.md#dmarc)). The reporting address is `dmarc@agent.molted.email` on the hosted service; plus-addressed variants (`dmarc+tag@...`) are accepted too.

### When the domain already has a DMARC record

Do not publish the record above. A domain can have only one DMARC record: two records on the same name make receivers ignore DMARC altogether, and replacing yours with `p=none` lowers your policy. Keep your record and add Molted's address to its `rua=` tag, separated from any address already there by a comma:

```txt title="DNS record"
_dmarc.notifications.yourcompany.com.  TXT  "v=DMARC1; p=reject; rua=mailto:existing@yourcompany.com,mailto:dmarc@agent.molted.email"
```

The same goes for a subdomain whose parent domain already has a DMARC policy: a subdomain with no DMARC record of its own is covered by a parent domain's record, so a `p=none` record on the subdomain would replace that protection for it. Do not publish one there; add Molted's address to the parent record's `rua=` tag.

The `dmarc.ifRecordExists` field in a domain response says the same. The one-click DNS setup is not offered for a domain that already has a DMARC record, for the same reason.

`p=none` is monitoring mode: it turns reporting on and changes nothing about how your mail is delivered. Collect a couple of weeks of data, confirm your legitimate senders align, then tighten to `p=quarantine` and eventually `p=reject`.

Reports usually start arriving within 24 hours (most providers send once a day). They show up in `GET /v1/me/dmarc/reports` like any uploaded report.

A few details worth knowing:

- **Attribution is by the domain in the report**, not the address it was sent to. A report only lands in your account if the domain it covers has status `verified` in your account (`temporary_failure` doesn't count). Reports for a domain you do not own, or one you added but have not verified yet, are dropped. If two accounts have verified the same domain, the report is dropped.
- **Only authenticated reporters are accepted.** The message must carry an aligned DKIM pass or a DMARC pass for its own From domain, as judged by our mail provider when it received the message (a header the sender wrote is ignored). Mail with no verdict, an SPF-only pass, or a pass for some other domain is dropped silently. Google, Microsoft and Yahoo sign their reports, so they pass.
- **The reporter is recorded.** A report that arrives by email stores the organisational domain of the sender we authenticated as `reporter_domain` (for example `google.com`), and reports are deduplicated per reporter, so a stranger cannot claim a real reporter's report id first. Reports you upload by hand, and reports stored before this field existed, have `reporter_domain: null`.
- **A mismatch is flagged, not refused.** When a report's `org_name` names a domain in a different organisation than the authenticated reporter (`org_name: "google.com"` sent from an unrelated domain), the report is still stored and carries `reporter_mismatch: true`. Domains are found inside decorated names too (`https://google.com`, `noreply@google.com`, `google.com Inc`). **`reporter_mismatch: false` means no mismatch was detected, not that the reporter is verified.** An `org_name` that names no domain, such as `Yahoo! Inc.`, is never judged, so anyone can pass an unflagged report under a free-text name. The reporter allowlist that would close this is not built yet.
- **There is a daily cap per reporter.** Each authenticated reporter domain (the organisation, so `google.com` is one reporter for your whole account) can store at most `max(50, 3 x your verified domains)` reports and `max(50 MB, 3 x your verified domains x 2 MB)` of report XML in any rolling 24 hours. Google and Microsoft send one report per domain per day, so the allowance grows with the number of domains you have verified and leaves headroom for each. Past the cap, further reports from that reporter are dropped (not stored, no error to the sender) until older ones leave the window, and other reporters are unaffected. Reports you upload by hand are never capped.
- A report is also dropped when any of its records names a domain outside the domain the report covers (the domain itself or a subdomain of it).
- Mail is only treated as a report when every recipient is the reporting address; a message that also goes to a real mailbox is handled as normal inbound mail.
- Subdomain reports roll up to the closest domain you have verified, so a report for `mail.yourcompany.com` lands in your account if you verified either `mail.yourcompany.com` or `yourcompany.com`.
- Reports never appear as inbound mail. They do not create threads, do not fire inbound webhooks, and are never classified by your agent.
- gzip and zip attachments are both handled, including archives holding more than one report (at most 20 entries and 2 MB uncompressed in total; a larger file is refused).
- Malformed or non-DMARC mail sent to the reporting address is dropped silently.

Failure reports (`ruf=`) are not ingested.

The DMARC routes below are for a signed-in human (cookie session, `/v1/me`). There is no agent API key route, CLI command or MCP tool for DMARC reports.

There is no reports page in the [portal](https://molted.email/docs/portal.md) either. A domain's DNS page shows only the record to publish; no screen lists the reports. Reading them means calling the routes below with a signed-in session.

## Upload a report

Send the raw file base64-encoded. Plain XML, `.gz`, and `.zip` are all accepted.

```
POST https://api.molted.email/v1/me/dmarc/upload
```

```bash title="curl"
curl -X POST https://api.molted.email/v1/me/dmarc/upload \
  -H "Cookie: YOUR_SESSION_COOKIE" \
  -H "Content-Type: application/json" \
  -d "{\"contentBase64\": \"$(base64 < report.xml.gz | tr -d '\n')\"}"
```

The body takes `contentBase64` (required); a `filename` is accepted and ignored.

```json title="Response"
{
  "reportId": "8c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
  "summary": {
    "totalMessages": 142,
    "passCount": 140,
    "failCount": 2,
    "passRate": 0.986,
    "dkimPassRate": 0.993,
    "spfPassRate": 0.986,
    "quarantineCount": 1,
    "rejectCount": 1,
    "uniqueSourceIps": 3,
    "topFailingSources": [{ "sourceIp": "203.0.113.7", "count": 2 }]
  },
  "duplicate": false
}
```

`reportId` is Molted's id for the stored report (use it with `GET /v1/me/dmarc/reports/:id`). Reports are deduplicated by the authenticated reporter, the reporter's org name and the report id (an identical file you upload by hand counts as the same report); a duplicate returns the existing report with `duplicate: true`. Uploading the same report twice is safe, and so is uploading one that already arrived through your `rua` address.

If the file holds more than one report (a zip with several entries), the first is returned in the top-level fields and the rest under `additional` (each `{ reportId, summary, duplicate, domain }`). Entries that couldn't be stored are listed as error strings under `failed`.

Maximum file size is 5 MB, and the report inside (after decompression, or a plain XML file) can be at most 2 MB; a larger one is refused on purpose, since real aggregate reports are far smaller. Errors are `400`: `contentBase64 is required`, `File exceeds 5 MB limit`, `No DMARC XML document found in the uploaded file`.

## List reports

```
GET https://api.molted.email/v1/me/dmarc/reports
```

```bash title="curl"
curl "https://api.molted.email/v1/me/dmarc/reports?domain=notifications.yourcompany.com" \
  -H "Cookie: YOUR_SESSION_COOKIE"
```

| Parameter | Type | Description |
| - | - | - |
| `domain` | `string` | Exact match on the domain the report covers (its published policy domain). |
| `startDate` | `string` | ISO 8601 date. Reports whose range begins on or after this date. |
| `endDate` | `string` | ISO 8601 date. Reports whose range ends on or before this date. |
| `limit` | `integer` | Number of results per page. Default 50, max 200. |
| `offset` | `integer` | Pagination offset. Default 0. |

Returns a plain array of report rows, newest `date_range_begin` first, with snake\_case fields: `id, tenant_id, domain, org_name, report_id, date_range_begin, date_range_end, total_messages, pass_count, fail_count, pass_rate, dkim_pass_rate, spf_pass_rate, quarantine_count, reject_count, unique_source_ips, policy_published, created_at, reporter_domain, reporter_mismatch`. The `*_rate` fields come back as strings (for example `"0.9860"`).

## Get report details

```
GET https://api.molted.email/v1/me/dmarc/reports/:id
```

```bash title="curl"
curl https://api.molted.email/v1/me/dmarc/reports/REPORT_ID \
  -H "Cookie: YOUR_SESSION_COOKIE"
```

```json title="Response"
{
  "report": {
    "id": "8c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
    "domain": "notifications.yourcompany.com",
    "org_name": "google.com",
    "report_id": "12345678901234567890",
    "date_range_begin": "2026-03-30T00:00:00Z",
    "date_range_end": "2026-03-30T23:59:59Z",
    "total_messages": 142,
    "pass_count": 140,
    "fail_count": 2,
    "pass_rate": "0.9860",
    "dkim_pass_rate": "0.9930",
    "spf_pass_rate": "0.9860",
    "quarantine_count": 1,
    "reject_count": 1,
    "unique_source_ips": 3,
    "policy_published": { "domain": "notifications.yourcompany.com", "adkim": "r", "aspf": "r", "p": "reject", "sp": "reject", "pct": 100 }
  },
  "records": [
    { "id": "...", "report_id": "...", "source_ip": "203.0.113.7", "count": 2, "disposition": "reject", "dkim_result": "fail", "spf_result": "fail", "header_from": "notifications.yourcompany.com", "auth_results": {} }
  ]
}
```

`report` is the same row the list returns (abridged here); `records` are the per-source rows, largest `count` first. An unknown id is `404 DMARC report not found`.

## Domain authentication summary

Get aggregated pass rates over the last `days` days (default 30, by report start date), for one `domain` or, without it, for all your domains.

```
GET https://api.molted.email/v1/me/dmarc/summary
```

```bash title="curl"
curl "https://api.molted.email/v1/me/dmarc/summary?domain=notifications.yourcompany.com&days=30" \
  -H "Cookie: YOUR_SESSION_COOKIE"
```

```json title="Response"
{
  "totalReports": 14,
  "totalMessages": 4280,
  "weightedPassRate": 0.994,
  "weightedDkimPassRate": 0.998,
  "weightedSpfPassRate": 0.994,
  "totalQuarantine": 3,
  "totalReject": 0,
  "topFailingSources": [{ "source_ip": "203.0.113.7", "total_count": 12 }]
}
```

The rates are weighted by message count; `topFailingSources` lists up to 10 sources.

## What to look for

| Metric | Healthy | Investigate |
| - | - | - |
| `weightedPassRate` | > 98% | \< 95% |
| `weightedDkimPassRate` | > 99% | \< 97% |
| `weightedSpfPassRate` | > 98% | \< 95% |
| `totalReject` (or a report's `reject_count`) | 0 | Any |

A record counts as a pass when DKIM or SPF passes. A low pass rate on a new domain often indicates DNS records haven't propagated or are misconfigured. Compare a report's `policy_published` against your DNS entries.

## Related reading

- [Sending Domains](https://molted.email/docs/domains.md) -- adding and verifying domains with DKIM, SPF, and DMARC records
