mirror of
https://github.com/profullstack/agentbbs.git
synced 2026-10-01 11:33:48 +00:00
Registration has been dead since 2026-09-13. `ssh join@bbs.profullstack.com` creates the account, then fails at the confirmation step with "couldn't email the code" and disconnects, so nobody can finish signing up. Cause: Caddy owns ACME for mail.profullstack.com and renewed on 2026-08-14 (valid to Nov 12), but Mailu went on serving the certificate it loaded at container start (Jun 15 -> Sep 13). When that lapsed, the STARTTLS handshake from internal/mail started failing verification and every transactional send died with it -- confirmation codes, signup notifications, credential mail. Reproduced against production; 25/465/993 all still present the expired cert while :443 serves the renewed one. Three things let a single stale certificate take registration down: - setup.sh installed the refresher and enabled its *timer*, but never ran it. `systemctl enable --now <timer>` starts the timer, not the service, so a redeploy left a stale cert in place (and did nothing at all if the timer was never scheduled). The news and IRC sections already run theirs at provision time; the Mailu section now does too, which is what repairs the live host. - refresh-certs.sh only compared files, so a copy whose reload silently failed left a fresh cert on disk and an expiring one on the wire -- invisible. It now reads back what the relay actually serves, forces a reload when that disagrees with /certs, refuses to copy a source cert that is itself expired, and no longer swallows the `docker compose restart` failure. It restarts `front` alone, the only container that mounts ./certs. - internal/mail verified the relay's certificate even on loopback, where there is nothing to intercept. It now skips verification for a loopback relay (the reasoning docs/mail.md already applies to the plaintext Dovecot hand-off) and gains AGENTBBS_SMTP_SERVERNAME, mirroring AGENTBBS_MAIL_SMTP_SERVERNAME, so the documented 127.0.0.1:25 config can verify against the mail host instead of an IP literal. A non-loopback relay is still verified. Errors are wrapped with the address and the failing stage so the next failure is one journal line to diagnose rather than nine days of silence. Tests cover the envelope, the unreachable-relay message, and both halves of the TLS decision: a loopback relay with an expired cert delivers, a non-loopback one with the same cert is refused. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| docker-compose.override.yml.example | ||
| docker-compose.yml | ||
| mailu.env.example | ||
| provision-mailbox.sh | ||
| README.md | ||
| refresh-certs.sh | ||
deploy/mailu — self-hosted mail for mail.profullstack.com
Mailu (Postfix + Dovecot + Roundcube + rspamd) as a Docker Compose stack,
fronted by the host Caddy. Full setup, DNS, and architecture: docs/mail.md.
Files
| File | Purpose |
|---|---|
docker-compose.yml |
the Mailu services (mail ports on host, HTTP on loopback) |
mailu.env.example |
config template → copy to mailu.env and fill secrets |
refresh-certs.sh |
copy Caddy's mail.$DOMAIN cert into Mailu, reload (timer) |
provision-mailbox.sh |
create a member mailbox / the gateway master user |
mailu.env, certs/, and data/ are gitignored (secrets + state).
Gateway master user
The agentbbs gateway opens any member's mailbox over IMAP with a single secret,
using Dovecot's master user feature (login <name>*<master>). Enable it with
a Dovecot override so Mailu accepts the * separator:
data/overrides/dovecot/auth-master.conf:
auth_master_user_separator = *
passdb {
driver = static
args = nopassword=y
master = yes
result_success = continue
}
Then create the master account and point agentbbs at it:
./provision-mailbox.sh --master "$(openssl rand -hex 16)"
# AGENTBBS_MAIL_MASTER_USER=gateway, AGENTBBS_MAIL_MASTER_PASS=<that secret>
The exact master-passdb wiring varies by Mailu version; verify against your pinned image before relying on it in production. SMTP submission from the gateway uses the trusted local relay (
127.0.0.1:25), not the master user.
Ops
docker compose up -d # start
docker compose logs -f smtp # tail Postfix
docker compose exec admin flask mailu config-export # DKIM keys, etc.
docker compose down # stop