- a delivery the relay accepted completes as sent, one given up as
failed, one to a missing mailbox (or with a missing body) is dropped
through store.DropOutbox; a retry changes nothing
- tests: each outcome of a post, giving up after MaxAge, a missing body,
and discussion mail sent before a bigger newsletter queued earlier
- RunOnce purged failed deliveries (a full scan) on every batch of 50: the Worker now
does it at most once every 5 minutes, by the store clock; a failed purge is retried
on the next run.
- Every recipient re-read the whole message from SQLite: a per-run map msgID -> body,
filled once per message even under concurrency, is dropped when the run ends.
- Tests count purges across batches and after the interval, and body reads per message
(including a missing body) through unexported hooks.
- Add failed deliveries: a permanent refusal by the relay (policy, size, line length) or the 3-day give-up marks the delivery failed, with the reason, and never retries it
- Keep failed deliveries listed for a week, then purge them and their stored message
- A non-existent mailbox still drops the delivery and counts a hard bounce
- Migrate the outbox table
- Add Worker.RunOnce, Run and Wake over the durable outbox
- Send prefix plus shared message per recipient with a per-send timeout
- Retry temporary failures after 1m, 5m, 15m, 1h, 3h, then every 6h; give up after 3 days
- Drop permanent failures; count a hard bounce only for bad-mailbox replies
- Leave interrupted sends queued on shutdown
- Share the bounce threshold between router and worker