Add scoped Mailu SMTP delivery with durable uncertainty #9
Loading…
Reference in a new issue
No description provided.
Delete branch "bb/portal-notification-provider-enrollment-and-acti-thr_ywz2dcyd3p"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a fixed Mailu SMTP transport for issue #3, with required STARTTLS and hostname validation, a dedicated envelope sender, and worker-only scoped credentials. Migration 6 persists the transport and first-attempt timestamp on each outbox row so SMTP crashes/expired leases become visible
delivery_uncertain; provider changes cannot replay pinned rows through another transport. All pending/blocked/sending Resend retries expire after 23 hours; never-attempted blocked rows remain eligible for a fresh first send. An explicit default-off worker delivery switch prevents credentials alone activating SMTP. API readiness remains disabled until deployment acceptance.Includes a bounded enrollment tool that prepares a disabled, non-admin/non-spoofing sender and TEST-NET-restricted mailbox token, storing only the scoped token in exact portal OpenBao custody with CAS=0. Live disabled preparation/readback succeeded, with zero sends. No live portal/env/network changes are included. Gateway and runtime integration remain owned by the deployment thread; independent review is required before enablement.
Validation: locked Cargo check; 2 synthetic SMTP tests covering STARTTLS refusal, wrong hostname, post-DATA disconnect, accepted DATA followed by QUIT4xx, and fixed headers/envelope; worker retry unit test; disposable PostgreSQL17 outbox/lease/aged-provider-switch integration (0.60s, final pin
bc40b1b6b8); 2 synthetic enrollment scope/idempotence tests. No real recipients or production messages.Issue #3 stays open. Remaining acceptance: separately reviewed gateway/runtime egress and observed source IP, scoped sender activation and owned delivery proof, independent portal Telegram bot enrollment capability. Live source e445 and the deployment hostname hook remain unchanged.