NixOS module and VM test merged as 0e6be382803367f19a831cd90d32108175bb69b3 (PR #17), not evaluated yet (no Nix on the machine it was written on). Open until nix flake check passes and the…
Merged into main with --no-ff as 0e6be382803367f19a831cd90d32108175bb69b3 (remote hash verified). The self-review is review 380 on this PR.
Q7 — test honesty. The test greps for the client's address after a session with successes, refusals (404, 400) and a 507. It has no positive control: if the grep could never match (a wrong interface, a different address format), it would pass vacuously. A control that turns Caddy's log on and expects a match is the next thing to add when it first runs on Linux.
Adversarial self-review — F23, the home relay
Q6 — defence in depth. IPAddressDeny=any + IPAddressAllow=localhost: even a compromised relay process cannot open a connection to anywhere but loopback. With DynamicUser, ProtectSystem=strict and the rest. Unrun (see Not verified).
Q1 — privacy: 507 after the token. A per-mailbox 507 before the token check would tell anyone who knows a mailbox id that it is busy. The planted bug the mailbox cap checked before the token proves the test sees it.
Q2 — expired invites do not count. The hourly purge removes them later. Counting them would let an hour of spam block new invites longer than the 7-day rule says. A planted bug proved the test.
Q3 — protocol change: a new status, 507. No new field, nothing new stored. Old clients see a non-2xx, which they already treat as try again later. Documented with date and reason, as CLAUDE.md section 3 asks. Abuse is bounded, not prevented: a flood can still fill the caps. Proof of work or invite-only mailbox creation is for a later protocol version.
Q5 — the relay never learns who connected. Caddy adds X-Forwarded-For by default; it and X-Real-IP and Forwarded are removed. The relay logged nothing anyway; now it does not even receive the address. Not tested: the VM test checks logs, not headers. A header check would need the relay to echo headers, which it must never do.
Q4 — no log at all from Caddy. Not access log off, errors on: Caddy's TLS-handshake and upstream errors can carry a client address. The cost is that an operator debugging a problem must switch logging on, and the README says what that writes.