10 Commits
Author SHA1 Message Date
Mateusz PstruchaandClaude Opus 5.5 d839d57e11 Bump to 0.4.0
CI / test (push) Successful in 2m49s
Release / image (push) Successful in 2m35s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.4.0
2026-09-23 11:05:56 +02:00
Mateusz PstruchaandClaude Opus 5.5 fd8ee8311c Add sending: outbox queue, SMTP worker, drafts
CI / test (push) Successful in 2m28s
Drafts and queued sends are one outbox row in different states, drained
by a background worker so SMTP never runs in the request path (§3.3).
Retries back off 1-16 min; 5xx, auth and TLS failures fail fast; items
a crashed worker left mid-send are reclaimed. Each message keeps its
Message-ID across retries, so an at-least-once duplicate is recognisable.
Reply headers are derived server-side from the parent, and sent mail is
filed into its thread alongside received mail.

Three things the libraries would have got wrong:
- mail-builder's .bcc() writes an ordinary Bcc header every recipient
  sees. Bcc goes in the envelope only; a test checks it never reaches the
  rendered bytes, and was confirmed to fail if .bcc() is reintroduced.
- mail-send trusts only compiled-in public CAs, while IMAP (native-tls)
  uses the OS store — a server with an internal-CA cert would sync but
  never send. SMTP now uses the OS store too.
- rustls is added with default-features off: its defaults pull in
  aws-lc-rs, which needs cmake/clang and would break the runner build.

Also fixes: UIDVALIDITY resets now only delete IMAP-sourced rows (sent
mail shares the table and exists nowhere else); first sync no longer
logs a false "UIDVALIDITY changed" warning; Message-IDs are stored bare
whichever path writes them (ENVELOPE brackets them, mail-parser doesn't);
accounts can choose STARTTLS vs implicit TLS for SMTP, defaulting by port.

Verified end to end against a TLS mail server with a private-CA cert,
with no plaintext patching: IMAPS sync, SMTPS send, delivery and headers
checked from the recipients' mailboxes, Bcc absent from other copies,
plaintext refused when STARTTLS is unavailable, retry scheduling on
connection failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 10:59:28 +02:00
Mateusz PstruchaandClaude Opus 5 bc39a1221c Add thread listing, fix dead path routes
CI / test (push) Successful in 29s
Adds GET /api/threads, grouped server-side: a thread's messages are
spread through the flat list by date, so a client grouping page-by-page
would split threads across page boundaries and miscount unread. The
thread detail endpoint now returns bodies too, so opening a conversation
is one request rather than one per message.

Fixes three routes that have been dead since the first commit. axum 0.7
spells a path parameter ':id'; '{id}' is axum 0.8 syntax and was being
matched as a literal segment, so GET /api/messages/<id>, GET
/api/threads/<id> and DELETE /api/accounts/<id> all 404'd. This fails
silently — no compile or startup error — and the original smoke test
only exercised list endpoints. Found by clicking a conversation in the
webapp.

Adds tests/routes.rs to cover route shape, verified to fail against the
old syntax.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 22:53:13 +02:00
Mateusz PstruchaandClaude Opus 5 6c73a91b8e Quieten docker build output in release logs
CI / test (push) Successful in 41s
The v0.2.0 release log was 17k lines, ~12k of which were BuildKit's
animated progress display repainting itself with cursor-movement
escapes. --progress=plain emits one line per event instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 22:23:34 +02:00
Mateusz PstruchaandClaude Opus 5 3e183b220c Add .dockerignore and bump to 0.2.0
CI / test (push) Successful in 2m31s
Release / image (push) Successful in 4m39s
Without .dockerignore the build context included target/ — gigabytes
sent to the daemon before the build even starts, on a host where disk
has already been a constraint. Verified the image builds, runs
migrations and serves /healthz.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
v0.2.0
2026-09-22 22:13:32 +02:00
Mateusz PstruchaandClaude Opus 5 a3213bf3e2 Cancel superseded CI runs
CI / test (push) Successful in 4m43s
A single runner serves all three repos, so superseded pushes queueing up
full builds is a real cost. Releases are left uncovered deliberately:
cancelling a publish halfway is worse than running it twice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 20:33:51 +02:00
Mateusz PstruchaandClaude Opus 5 0272a6f46b Document runner host package requirements
CI / test (push) Successful in 4m40s
First CI run failed with "linker cc not found" — the runner executes
jobs on the host, so the C toolchain a container image would normally
provide has to be installed there. Records the fix, and notes openssl-devel
as the next thing that would break so it can be installed in one go.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 20:17:23 +02:00
Mateusz PstruchaandClaude Opus 5 a4401936a0 Target the rocky-10 runner and its proven action conventions
CI / test (push) Failing after 1m17s
Match the setup already working on that runner: setup-* actions to
provision toolchains rather than host-installed tooling, and the
automatic GITHUB_TOKEN. Registry push keeps a dedicated REGISTRY_TOKEN,
since the automatic token's scope doesn't reliably cover packages.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 20:12:29 +02:00
Mateusz PstruchaandClaude Opus 5 3b96f80f36 Store flags in IMAP wire format, add CI and ops docs
CI / test (push) Canceled after 0s
Flags were stored via Debug formatting of async-imap's Flag enum, which
produced Rust-internal spellings ("Seen", "Custom(\"$Junk\")") that don't
round-trip back through Flag::from and aren't what the schema documents.
Map to canonical wire spelling (\Seen, $Junk) before the webapp starts
depending on it, with tests pinning the format.

Adds Gitea Actions CI/release workflows, an nginx rate-limiting config
for the §7 gap, and a shared release-process doc. Records the decision
not to reconcile server-side flag changes or deletions, with the
conditions that should trigger revisiting it.

Also applies rustfmt and clears clippy, so CI passes from the first run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 19:55:09 +02:00
Mateusz PstruchaandClaude Opus 5 4c1a6457c5 Initial sync server: IMAP engine, schema, and read API
Covers phases 1-2 of the build order in the architecture spec: the IMAP
sync engine (IDLE + UIDVALIDITY tracking + jittered reconnect, headers
first with lazy body fetch), the full data model, and a minimal REST API
for auth, accounts, folders, messages and delta polling.

Credentials are encrypted at rest with ChaCha20-Poly1305 rather than
libsodium secretbox, to avoid a system dependency for the same
construction.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 19:00:59 +02:00