release: 1.1.0: Domain-admin role and internal/web package split
The first MINOR after 1.0.0: send-only DMARC guidance in the panel, AGPL packaging on every page, and an internal split of `internal/web` ahead of domain-admin work. Upgrading runs one SQLite migration (empty defaults; existing DNS guidance is unchanged until you set a report address). Changed: - `internal/web` split into subpackages (`web/view`, `web/auth`, `web/validate`, Added: - panel: DMARC guidance for send-only relays — the suggested `_dmarc` record - AGPL packaging hygiene: [NOTICE](NOTICE) names the copyright holder and the - [docs/roadmap.md](docs/roadmap.md) — candidate item **visual-style** (panel Full detail: CHANGELOG.md (1.1.0).
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
# 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 `admin.dmarc_report_email` and `domains.dmarc_rua` for 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)
|
||||
|
||||
1. Receiving MTAs → SMTP to SelfPost (hub MX).
|
||||
2. Postfix virtual alias or dedicated listener → panel ingest worker.
|
||||
3. Parse XML → `dmarc_reports` table (domain, reporter, counts, date).
|
||||
4. Panel reads SQLite; links from domain DNS card.
|
||||
|
||||
May share port-25 plumbing with [inbound-relay.md](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](../guide.md); migrations are backward-compatible.
|
||||
|
||||
## Risks
|
||||
|
||||
- Attack surface of accepting mail (mitigate: strict recipient allow-list).
|
||||
- Report volume and retention (mitigate: caps + pruning).
|
||||
@@ -23,7 +23,7 @@ list:
|
||||
deletion, its own L2 limit);
|
||||
- the domain's DKIM/DNS status;
|
||||
- the send log filtered to the domain — the filter already exists in the log
|
||||
([sendLogData](../../internal/web/handlers_monitor.go)).
|
||||
([sendLogData](../../internal/web/handlers/handlers_monitor.go)).
|
||||
|
||||
What stays outside the role is what is global by nature:
|
||||
|
||||
|
||||
+18
-4
@@ -1,6 +1,6 @@
|
||||
# Plan: web-split (splitting `internal/web`)
|
||||
|
||||
**Status:** agreed
|
||||
**Status:** done (see [CHANGELOG](../CHANGELOG.md) `[1.1.0]`)
|
||||
**Version:** `1.x`; an internal refactor, it does not force a break on its own.
|
||||
|
||||
---
|
||||
@@ -42,11 +42,25 @@ domains. The refactor is cheaper before that growth than after it.
|
||||
|
||||
The order is a recommendation, not a blocker.
|
||||
|
||||
## Chosen scheme
|
||||
|
||||
**Horizontal split into four packages** (decided at implementation):
|
||||
|
||||
```
|
||||
internal/web/ # Config, Server, New, Handler — composition root; security.go
|
||||
internal/web/view/ # embed templates/static, render/renderFragment, staticHandler
|
||||
internal/web/auth/ # session, login/logout/setup, requireAuth, currentUser
|
||||
internal/web/validate/ # shared form validation (avoids auth ↔ handlers import cycle)
|
||||
internal/web/handlers/ # all authenticated page handlers (handlers_*.go)
|
||||
```
|
||||
|
||||
`cmd/panel` keeps importing only `internal/web`. Subpackages are not exported
|
||||
beyond what the composition root needs.
|
||||
|
||||
## Done when
|
||||
|
||||
The decision is made deliberately when the work starts — either the package is
|
||||
split along the chosen scheme, or it is settled that it stays flat. After a
|
||||
split: `build`/`vet`/`test` green, the panel's behaviour unchanged.
|
||||
The package is split along the scheme above. After the split: `build`/`vet`/`test`
|
||||
green, the panel's behaviour unchanged.
|
||||
|
||||
## Risks
|
||||
|
||||
|
||||
Reference in New Issue
Block a user