Commit graph parsimony/internal/api/api.go
Author SHA1 Message Date
tgiachi
94b5a58e93 fix(store): moderation listings never read message bodies, bound the held bytes
- Store subject, From header and size when a message is held; ListHeld returns the summary only
- Cap one held message at 10 MiB (ErrHeldTooLarge) and the bytes held per list at 200 MiB (ErrHeldFull)
- Summarise the messages already held when migrating an existing database, one at a time
- Show the From header and whether it differs from the envelope sender in the held API
- Thread listings no longer load the bodies of the thread
2026-11-10 11:39:21 +01:00
tgiachi
afd067688c feat: show failed deliveries in the API, CLI and UI 2026-11-09 20:34:37 +01:00
tgiachi
625d487eca fix(security): API token strength and brute-force lockout
- Refuse an API token under 24 characters or with whitespace at startup, without echoing it
- Lock an address out for 5 minutes after 10 wrong or missing tokens in 5 minutes (429 with Retry-After)
- Ignore X-Forwarded-For for the lockout, forget idle addresses
- Document both
2026-11-09 20:25:05 +01:00
tgiachi
eb9e915805 fix(security): hold posts whose From header does not match the sender
- Judge membership on the envelope sender and require the From header to name the same address
- Hold mismatches (and missing, unparsable or multiple From addresses) for the admin instead of delivering
- Record why a message was held: new held.reason column, migrated, shown in the API, CLI and UI
- Accept an empty message in the held queue
- Document who may post
2026-11-09 20:23:07 +01:00
tgiachi
cd596e1810 feat(api): import an mbox into a list's archive
- Add POST /api/v1/lists/{id}/archive/import, streaming the body
- Return a summary of imported, duplicate and failed messages; failures do not fail the request
- Import regardless of the archive policy
2026-11-09 17:15:05 +01:00
tgiachi
98bbcf6b68 feat(api): inspect and discard the outbound queue
- Add GET /api/v1/queue with totals, oldest age and up to 100 deliveries, failing ones first
- Add DELETE /api/v1/queue/{id} to discard a stuck delivery
- Never expose message contents
2026-11-09 15:54:13 +01:00
tgiachi
d8275aaa1f feat(store,api): archive with full-text search, threading and archive policy
- Add archive table with FTS5 index kept in sync by triggers
- Deduplicate by Message-ID per list so MTA retries do not repeat posts
- Thread messages through In-Reply-To within the same list
- Quote every search word so user input is never FTS syntax
- Add archive_policy (public, private, off) with migration
- Add API to list, search, read and delete archived messages
2026-11-09 15:17:13 +01:00
tgiachi
ad58789630 feat(api): list policies, held queue and member bounce state
- Add post_policy and join_policy to lists, patchable per field
- Add held message listing, approve and discard endpoints
- Expose disabled and bounce_count on members
- Reject '+' in list names, it is the command separator
- Wire the router release into the daemon
- Update OpenAPI description and README
2026-11-09 15:05:11 +01:00
tgiachi
7ce6a1c98e feat(api): REST API for lists and members
- Add /api/v1 JSON endpoints: lists CRUD, members add/list/remove, health
- Protect routes with a constant-time bearer token check
- Reject unknown JSON fields and invalid names or addresses
- Map store errors to 404 and 409
2026-11-09 14:57:43 +01:00