fix(2): Q4.9 mailu — rewrite mail-flow via in-container sendmail+doveadm; drop network IMAP-auth test

Root cause of the 2 failing custom tests: TLS_FLAVOR=notls → dovecot refuses plaintext auth over
network 143, so host-side IMAP login/auth isn't a meaningful signal. Smoke2 PROVED the in-container
path: sendmail (postfix container) local-injects a marker mail → doveadm search (imap container) finds
it in INBOX. test_mail_flow now exercises the real postfix→rspamd→dovecot deliver/store/fetch via
exec_in_app(service=smtp/imap). Dropped test_imap_login (network plaintext-auth disallowed under notls).
test_mailbox (create+config-export read-back) unchanged. PARITY.md updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-29 21:33:11 +01:00
co-authored by Claude Opus 4.8
parent 916bdd8b68
commit 88449431e1
3 changed files with 41 additions and 131 deletions
+9 -7
View File
@@ -15,16 +15,18 @@ email stack: nginx front + admin + postfix/smtp + dovecot/imap + rspamd/antispam
wildcard TLS via Traefik. Mail ports 25/465/587/110/143/993/995 are published mode:host → on-host
(cc-ci-run) tests reach SMTP/IMAP at 127.0.0.1.
## Recipe-specific functional tests (P3 — ≥2; here 3)
## Recipe-specific functional tests (P3 — ≥2)
1. `functional/test_mailbox.py` — §4.3 create-an-object + read-back: create a mailbox via the admin
container's `flask mailu user` CLI, then read it back from `flask mailu config-export --json` and
assert the address is present (admin-DB provisioning round-trip).
2. `functional/test_imap_login.py`distinctive (working mail account): the provisioned mailbox
AUTHENTICATES against dovecot over IMAP (127.0.0.1:143) and SELECTs its INBOX — proving the
account is real end-to-end (admin → dovecot auth), not just a DB row.
3. `functional/test_mail_flow.py` — the characteristic end-to-end flow: SEND a uniquely-marked
message to the mailbox over SMTP (authenticated submission to avoid rspamd greylisting), then
RETRIEVE it over IMAP and assert the marker arrived (postfix → rspamd → dovecot deliver/store/fetch).
2. `functional/test_mail_flow.py`the characteristic end-to-end mail flow: INJECT a uniquely-marked
message to the mailbox via the postfix container's local `sendmail` (locally-originated → not
greylisted), then VERIFY delivery+storage via dovecot's `doveadm search` in the imap container —
a real postfix → rspamd → dovecot deliver/store/fetch round-trip. We use the in-container mail
tools (not the host network ports) because TLS_FLAVOR=notls makes dovecot refuse plaintext auth
over the network (143); the in-container path exercises the same delivery/storage stack. (A
network IMAP-auth test was dropped: under notls dovecot disallows plaintext network auth, so a
host-side login is not a meaningful signal here.)
## Backup data-integrity (P4) — N/A (recipe ships no backup config)
The upstream mailu recipe declares **no `backupbot.backup` label** on any service, so the cc-ci