The mail test client: every client check in one command (K-L2) #34

Merged
jcoffey-dev merged 2 commits from feat/mail-client into main 2026-11-20 06:48:11 +00:00
Owner

Closes K-L2 (#9): lab/chart/mailcheck.sh runs every client check against an installed chart.

lab/chart/mailcheck.py, as [email protected], each check named, one table, exit 1 on any failure:

Check What
smtp in a message from another domain on 25
submission alice on 465, implicit TLS and AUTH: to herself, and out to [email protected]
imap both arrive, found over IMAPS (any mailbox: the inbound one lands in Junk)
jmap both found with Email/query, signed in with OAuth (JMAP doesn't take Basic)
smtp out the outgoing one reaches the outside server from alice, DKIM-signed d=lab.test
caldav an event PUT, read back, DELETEd, then 404
carddav a contact the same

Then signin.py (the webmail across both replicas) and console-signin.py, as before.

The outside server: lab/chart/mail-sink.yaml, a small SMTP sink (plain Python) in its own namespace, in the CloudNativePG PostgreSQL image the cluster already has, so no new image. It logs each message as a JSON line, which the check reads. Mail for sink.test gets there by a Relay route lab-sink and one line in the outbound strategy, which the check adds as admin if they're missing. So it works on any seeded lab, not just a fresh one.

e2e.sh now runs mailcheck.sh after the install, in place of its own three steps. Plus a one-line fix in tools.sh: kubectl version | head -1 could die of SIGPIPE under pipefail (it failed one CI job).

Tested: the bench lab (all checks pass), and all six CI jobs from scratch (3 Kubernetes minors × amd64/arm64). The checks take about 12 s in all; e2e is ~240 s.

Closes K-L2 (#9): **`lab/chart/mailcheck.sh`** runs every client check against an installed chart. `lab/chart/mailcheck.py`, as [email protected], each check named, one table, exit 1 on any failure: | Check | What | |---|---| | smtp in | a message from another domain on 25 | | submission | alice on 465, implicit TLS and AUTH: to herself, and out to [email protected] | | imap | both arrive, found over IMAPS (any mailbox: the inbound one lands in Junk) | | jmap | both found with Email/query, signed in with OAuth (JMAP doesn't take Basic) | | smtp out | the outgoing one reaches the outside server **from alice, DKIM-signed `d=lab.test`** | | caldav | an event PUT, read back, DELETEd, then 404 | | carddav | a contact the same | Then `signin.py` (the webmail across both replicas) and `console-signin.py`, as before. **The outside server:** `lab/chart/mail-sink.yaml`, a small SMTP sink (plain Python) in its own namespace, in the CloudNativePG PostgreSQL image the cluster already has, so no new image. It logs each message as a JSON line, which the check reads. Mail for `sink.test` gets there by a Relay route `lab-sink` and one line in the outbound strategy, which the check adds as admin if they're missing. So it works on any seeded lab, not just a fresh one. `e2e.sh` now runs `mailcheck.sh` after the install, in place of its own three steps. Plus a one-line fix in `tools.sh`: `kubectl version | head -1` could die of SIGPIPE under pipefail (it failed one CI job). **Tested:** the bench lab (all checks pass), and [all six CI jobs](https://github.com/inbuxa/inbuxa-k8s-lab/actions/runs/44687987705) from scratch (3 Kubernetes minors × amd64/arm64). The checks take about 12 s in all; e2e is ~240 s.
jcoffey-dev added 2 commits 2026-11-20 06:33:21 +00:00
lab/chart/mailcheck.py checks, as alice: SMTP in on 25, submission on 465
with AUTH, IMAPS, JMAP (OAuth, Email/query), SMTP out to an outside
server, CalDAV and CardDAV round trips; one table, exit 1 on any failure.
The outside server is lab/chart/mail-sink.yaml, a small SMTP sink in its
own namespace, in the CloudNativePG image the cluster already has; mail
for sink.test reaches it by a Relay route the check sets up as admin. The
outgoing message has to arrive from alice and DKIM-signed for lab.test.

lab/chart/mailcheck.sh runs it with the webmail (across both replicas)
and console sign-ins against an installed chart; e2e.sh now runs that
after the install.
tools.sh: no SIGPIPE from kubectl's version line
ci / check (pull_request) Successful in 43s
89eca8a399
head -1 closed the pipe while kubectl was still writing; under pipefail
that failed the step (exit 141), once in six CI jobs.
jcoffey-dev merged commit 443f4bb560 into main 2026-11-20 06:48:11 +00:00
jcoffey-dev deleted branch feat/mail-client 2026-11-20 06:48:12 +00:00
Sign in to join this conversation.