Commit graph parsimony/internal/app
Author SHA1 Message Date
tgiachi
064e8beed8 fix(security): LMTP allow list and a warning for an open LMTP port
- 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
2026-11-09 20:20:35 +01:00
tgiachi
dca9117a2e feat(app): sign outgoing mail with the configured DKIM keys
- 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
2026-11-09 19:59:57 +01:00
tgiachi
6c95184adc feat: deliver through the persistent queue
- 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
2026-11-09 15:53:47 +01:00
tgiachi
5a0dd7f6d6 feat(adminui): embed the admin SPA and serve it next to the API
- 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
2026-11-09 15:29:12 +01:00
tgiachi
8f64ac671d feat: serve the public web from the daemon and document the archive
- 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
2026-11-09 15:22:50 +01:00
tgiachi
7fc1bed7e9 fix(app): do not log closed listener errors on shutdown 2026-11-09 15:13:35 +01:00
tgiachi
952fada19c refactor: move daemon wiring into internal/app and test it end to end
- 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
2026-11-09 15:12:51 +01:00