When the global cap of unconfirmed requests (300 an hour) was reached,
a subscribe request silently got no mail while the visitor saw "Check
your email"; a newsletter launch can pass 300 signups an hour.
- limits.pending_per_hour (default 300, must be a whole number >= 1)
is validated at load and set on the store by the app.
- When the global cap refuses a request the store logs a warning naming
the setting, at most once a minute. The visitor still gets the
neutral page, so nothing about members is revealed. The per-address
cap is unchanged and is not logged.
- parsimony.example.yaml documents the setting.
Behind a reverse proxy every visitor shared the proxy's address, so the
whole site got 10 signups an hour and one person could block everyone.
Over IPv6 each address of a /64 was a fresh key, so the limit did not
bind and the map grew by one entry per address.
- web.trusted_proxies (addresses or CIDR ranges, default empty) is
validated at load and passed to the web handler. X-Forwarded-For is
read only when the TCP peer is a trusted proxy; the client is then the
right-most entry that is not itself a trusted proxy. An empty or
malformed header falls back to the peer. With no trusted proxy the
behaviour is unchanged: the header is ignored.
- IPv6 clients are keyed by their /64, IPv4 clients by address.
- The limiter remembers at most 100000 clients. When full it sweeps
expired entries first and otherwise answers 429 to new clients until
the oldest window ends, instead of growing.
- one line of wiring, a commented example in parsimony.example.yaml
- tests: with a rate of 20/s eight deliveries to a sink take at least 350 ms, without a rate they are not paced
Close cut the LMTP connections while their handlers still ran, so a post
committed to the queue could lose its 250 and be sent again by the MTA.
- Close stops accepting, waits for the LMTP Serve loop to return, then
calls smtp.Server.Shutdown and http.Server.Shutdown with one shared
deadline (shutdownTimeout, 30 s)
- when the deadline passes, the LMTP connections still open are cut
through a tracking listener (smtp.Server.Close is a no-op once Shutdown
began) and the HTTP servers are closed
- the queue worker and the store stop only after that
- tests: a post in flight during Close is queued and gets its 250; a hung
client is cut after the grace period; the open-connections test uses a
short grace period
- the API + admin UI server and the public web server get ReadTimeout 30s,
WriteTimeout 60s and IdleTimeout 120s next to ReadHeaderTimeout
- the archive import extends its own read and write deadlines to 30
minutes with http.ResponseController, so a big mbox is not cut
- tests: a stalled body and an idle connection are cut on both servers,
an import longer than the default timeouts succeeds, fields are pinned
- README: document the limits and timeouts
- Read the relay password and CA file at startup; refuse to start on an unusable one
- Pass TLS mode, server name, CA pool, credentials and EHLO name to the SMTP relay
- Default the EHLO name to the host name
- Test an authenticating STARTTLS relay, a wrong password (mail stays queued) and the startup checks
- Document external relays in the README and the example config
- Add lmtp.allow: clients outside the list are dropped before the greeting (TCP only)
- Validate the list at load, naming the bad entry
- Warn at startup when LMTP is reachable beyond the machine and no list is set
- Stop publishing the LMTP port in the README and the example config; add Security notes
- Load the keys at startup and refuse to start on a broken one
- Sign every outgoing message, confirmation mail included, with the key of its From domain
- Send unsigned when the domain has no key
- Router.Deliver queues one entry per recipient atomically; posts are accepted once queued
- LMTP answers 451 only when the database fails, never because the relay is down
- Confirmation mail uses the same queue
- Wire the worker into the daemon: relay.concurrency config, wake on enqueue, interrupt on Close
- Make SMTPRelay honour the context deadline and cancellation on a silent relay
- Test restart survival, relay outage with retry, and Close with a hung relay
- Add internal/adminui with a SPA handler: index fallback for client routes, immutable caching for hashed assets, 404 for missing assets, security headers
- Answer 503 with a hint when the UI has not been built, so go build always works
- Mount the UI at / and the API at /api/ on the same listener, no CORS needed
- Scaffold admin/ with Vite, React, TypeScript, Tailwind v4, shadcn/ui and Vitest
- Add web.listen config (default 127.0.0.1:8081, empty disables)
- Start the public web in app, close it with the rest
- Add end-to-end test: archive stays private, becomes public, hides addresses, one-click unsubscribe works
- Cover mutation survivors: attachments, first text part, multibyte cap, member id 0, page clamp, API limit cap, closing connections
- Update OpenAPI, README and example config
- Add app.Start and App.Close, main only parses flags and waits for signals
- Add end-to-end test: API creates a list, LMTP posts, a fake relay receives VERP copies
- Cover disabled API, bad database, busy port and idempotent Close
- Fix a shutdown race: Close before Serve left the LMTP server blocked