fix(admin): type the held fixture, update the e2e token and LMTP allow list

- Add the reason field to a test fixture so tsc -b passes
- Use a 24+ character API token and an lmtp.allow list in the end-to-end stack
- Describe failed deliveries in the README
This commit is contained in:
tgiachi 2026-11-09 20:35:54 +01:00
commit 2b66937ac7
3 changed files with 8 additions and 4 deletions

View file

@ -146,8 +146,11 @@ LMTP answers `250` when the post is in the queue, so a down relay never bounces
It answers `451` only when the database itself fails.
- Temporary relay errors (4xx, timeouts, connection failures) are retried with backoff.
- A permanent rejection (5xx) drops that delivery. Only a bad-mailbox reply (`5.1.x`) counts as a hard
bounce for the member; errors such as "relay access denied" never disable members.
- A permanent rejection of the message by the relay (5xx: policy, size, line length...) is never retried, but the
delivery is not made to vanish: it is kept as **failed**, with the reason, for a week (queue API, `parsimony queue ls`,
the Queue page; discard it to clear it). The same happens when a delivery is still failing after 3 days.
- A bad-mailbox reply (`5.1.x`, the address does not exist) drops the delivery and counts as a hard bounce for the
member (3 disable it). Other errors, such as "relay access denied", never disable members.
- Delivery is at-least-once: a crash between the relay accepting a message and the queue entry being
removed can send one message to one recipient twice.
- `GET /api/v1/queue` and the Queue page show what is pending or failing, and a stuck delivery can be discarded.

View file

@ -50,7 +50,7 @@ describe('list page', () => {
installFakeApi(
newState({
lists: [dev()],
held: { 1: [{ id: 5, sender: 'a@x.com', subject: 's', size: 10, created_at: '2030-01-01T00:00:00Z' }] },
held: { 1: [{ id: 5, sender: 'a@x.com', subject: 's', size: 10, created_at: '2030-01-01T00:00:00Z', reason: '' }] },
}),
)
renderApp('/lists/1', { token: 'good' })

View file

@ -34,7 +34,7 @@ import (
)
const (
token = "e2e-token"
token = "e2e-token-0123456789-abcdefghij"
domain = "lists.example.test"
)
@ -108,6 +108,7 @@ base_url: %s
lmtp:
network: tcp
addr: 0.0.0.0:2424
allow: [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16]
relay:
addr: postfix:25
concurrency: 4