Phase 78 β Stalwart Mail Server
Deployed: 2026-07-24 | Version: Stalwart v0.16.13 | Namespace: mail
Stalwart is a modern all-in-one mail server (SMTP, IMAP, JMAP). This deployment makes @devandre.sbs a fully bidirectional mail domain: outbound via Amazon SES relay, inbound via SES receipt rules β Lambda β Stalwart SMTP.
Architectureβ
Outbound: Stalwart SMTP β SES eu-west-1 β recipient
Inbound: sender β SES MX (inbound.devandre.sbs) β Lambda β Stalwart LMTP
Internal: Alertmanager / n8n β stalwart.mail.svc.cluster.local:587 STARTTLS
| Component | Detail |
|---|---|
| Image | ghcr.io/stalwartlabs/mail-server:v0.16.13 |
| Storage | Longhorn 1Gi RWO PVC (data-stalwart-0) β config + RocksDB |
| Auth | Authentik SSO via auth.devandre.sbs (OIDC) |
| Outbound relay | SES eu-west-1 SMTP (email-smtp.eu-west-1.amazonaws.com:587) |
| Credentials | Vault platform/mail + platform/ses |
| Admin UI | https://mail.devandre.sbs (Authentik protected) |
Configuration persistenceβ
All Stalwart configuration (domains, rules, users, DKIM keys, relay settings) is stored in RocksDB on the Longhorn PVC β not in the gitops manifests. The JMAP API (/api/ endpoint) is the management interface.
This means:
- Config survives pod restarts and rescheduling
- Config does not survive PVC deletion
- The PVC is in the Longhorn backup group β included in daily MinIO backups
Backup the config:
kubectl exec -n mail stalwart-0 -- stalwart-cli export > /tmp/stalwart-config.json
Internal SMTP relay (for cluster services)β
Alertmanager, n8n, and other cluster services send mail via:
host: stalwart.mail.svc.cluster.local
port: 587
user: admin@devandre.sbs
STARTTLS: true (insecure_skip_verify: true for internal CA)
The smtp_require_tls: true + insecure_skip_verify: true combination is required β Go's smtp.PlainAuth refuses PLAIN auth on non-TLS non-localhost connections.
SES outbound relayβ
Outbound mail is relayed through SES eu-west-1. SES production access was approved 2026-07-26. DKIM, SPF, and DMARC are all configured for devandre.sbs.
SMTP credentials are in Vault at platform/ses (smtp_user, smtp_password).
Inbound pipeline (SES β Lambda β Stalwart)β
See Phase 80 β Amazon SES for the full inbound pipeline.
Real-world skills demonstratedβ
| Skill | Industry context |
|---|---|
| Self-hosted mail with SES relay | SES handles deliverability and IP reputation β the cluster handles routing and storage |
| JMAP for mail server config | Modern alternative to config files β fully API-driven, versionable |
| Bidirectional custom domain mail | Full inbound + outbound pipeline with DKIM/SPF/DMARC β enterprise email hygiene |
| Cluster-internal SMTP relay | Standard pattern: one trusted internal relay for all cluster services |
| RocksDB on Longhorn | Config persistence outside gitops β tradeoff between GitOps purity and operational flexibility |