1cf8bfcbe2
test / test (push) Has been cancelled
The CSRF ADR, guide.md, architecture.md route table, the internal/backup package comment, roadmap/dmarc-reports admin.dmarc_report_email references, the e2e coverage summary, and the setupManager/store package comments still described the pre-1.2.0 single-administrator panel or stale implementation details. Closes P2 of docs/plans/code-review.md; no behaviour change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1.7 KiB
1.7 KiB
Plan: dmarc-reports
Status: candidate
Goal
SelfPost receives DMARC aggregate reports on SMTP, parses them inside the
image, and shows summaries in the panel — pass/fail by source, hints when
tighten p= is reasonable. No external DMARC SaaS and no IMAP workflow for the
operator.
Scope
In:
- Inbound SMTP for configured report addresses only (not a general backup-MX).
- gzip + XML aggregate parsing → SQLite summaries per sending domain.
- Panel page and/or per-domain section: recent reports, third-party senders, delivery health of report ingestion.
- Reuse the
dmarc_report_emailsetting (moved off the oldadmintable intosettingsby migration0005) anddomains.dmarc_ruafor DNS templates; when enabled, suggest a SelfPost-hosted report address.
Out:
- Forensic reports (
ruf=). - Full dashboards, APIs, email alerting.
- Mailboxes for people (IMAP/POP3/webmail).
Architecture (sketch)
- Receiving MTAs → SMTP to SelfPost (hub MX).
- Postfix virtual alias or dedicated listener → panel ingest worker.
- Parse XML →
dmarc_reportstable (domain, reporter, counts, date). - Panel reads SQLite; links from domain DNS card.
May share port-25 plumbing with inbound-relay.md but must remain a separate, opt-in feature that does not forward mail upstream.
Done when
- Operator can point
rua=at an address SelfPost accepts and see parsed summaries in the panel within one reporting cycle. - With the feature off, outbound-only behaviour is unchanged.
- Documented in guide.md; migrations are backward-compatible.
Risks
- Attack surface of accepting mail (mitigate: strict recipient allow-list).
- Report volume and retention (mitigate: caps + pruning).