Repository navigation
Description
Goal
The maintainer wants to read his mail from devices he does not own. That means a webmail, Bulwark, at https://mail.platform.devantler.tech/. For that, Stalwart's web side (JMAP, OAuth sign-in, /account, /admin, DAV) moves to https://stalwart.platform.devantler.tech/. The same work fixes the mail server's identity: its server name is the web gateway's name today, so its SMTP greeting, autoconfig and MTA-STS policy all name the wrong host.
Decisions (maintainer, 2026-11-25)
- Stalwart's web side moves to
stalwart.platform.devantler.tech, which becomes the OAuth issuer. - Bulwark sits behind GitHub SSO (oauth2-proxy) and signs in to the mailbox only through Stalwart's own OAuth login (PKCE public client,
OAUTH_ONLY). The mail password and two-factor code are typed on Stalwart's page, never Bulwark's. - Uploads are allowed for the maintainer's account only: the JMAP upload ban is narrowed, so attachments, filters and the vacation reply work in webmail.
- Webmail sessions: 15 minutes idle, 12 hours maximum, with "remember me" off by default.
Plan
- Second hostname.
stalwart.${domain}goes on the Stalwart route next tomail.${domain}, with tests. CORS headers allow only Bulwark's origin, set at the route rather than with Stalwart's permissive CORS. No restart. - Bulwark, dark launch. A production-only third-party app: digest-pinned
ghcr.io/bulwarkmail/webmail, restricted pod security, deny-all network policy plus egress only tostalwart.${domain}:443, and readiness proven before any route exists.- Settings:
NO_THIRD_PARTY_TRAFFIC,STALWART_FEATURES=false,STALWART_ADMIN_ACCESS=offand the session policy.
- Settings:
- One announced restart, after the history copy and before MX moves. It carries:
- the server name
mail.devantler.tech; STALWART_PUBLIC_URL=https://stalwart.platform.devantler.tech(both settings must change together);- the narrowed upload ban;
- implicit-TLS submission on 465;
- POP3 no longer advertised.
- the server name
- The swap. In one apply:
- Stalwart's route keeps only
stalwart.${domain}; - Bulwark's route takes
mail.${domain}behind oauth2-proxy, DNS-only; - the users of the old name move with it: the bookkeeper collector URL and network policy, test(bookkeeper): pin the collector's JMAP endpoint to the mail route #6653,
scripts/diagnose-email-startup, the Homepage link and the docs. - Reissue the maintainer's CalDAV/CardDAV profile with the same identifier.
- Stalwart's route keeps only
- Mail auto-setup.
autoconfig.devantler.tech, optionallyautodiscover., routed by path to Stalwart. - After MX moves. MTA-STS (
mta-sts.devantler.tech,_mta-stsand_smtp._tls), in testing mode, then enforce. Set reverse DNS of the mail load balancer tomail.devantler.tech.
The SSO cookie's __Host- prefix is tracked in the companion naming issue and lands before Bulwark goes live.
Acceptance
- Sign-in works from a fresh browser profile: GitHub SSO, then Stalwart login with two-factor.
- Signing out forces credentials again.
- The 15-minute idle limit fires.
- The browser makes no third-party requests.
- The CORS preflight from
mail.platform…passes, and other origins get no CORS headers. - The SMTP greeting, autoconfig and the MTA-STS
mxnamemail.devantler.tech. - The collector and the diagnostic follow the new host.
Part of #5030. The research is in the maintainer's decision report of 2026-11-25. Sources: bulwarkmail/webmail, bulwarkmail.org/docs, stalw.art/docs, RFC 8314/8461/7489/6186, draft-ietf-mailmaint-autoconfig.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Start date
Target date
Effort
Projects
- StatusShow more project fieldsNo status
Activity
coderabbitai commentedon Nov 25, 2026
🔗 Related PRs
#5482 - fix(homepage): show Stalwart with its logo under Email [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
devantler commentedon Nov 25, 2026
Step 1 done: Stalwart answers at
stalwart.platform.devantler.tech#6664 merged at 19:35Z and was deployed by its merge-group run. Checked live at 19:40Z, read-only.
private-mail/private-mailmail.platform…andstalwart.platform…; Accepted at generation 349.12.20.241, AAAA2a01:4f8:c01e:3486::1: the same gateway asmail.platform…, DNS-only (not Cloudflare-proxied). external-dns created both at 19:29:39Zstalwart.platform.devantler.tech/admin,/account/.well-known/oauth-authorization-server/jmap/sessionwithout credentialsOPTIONS /jmap/fromOrigin: https://mail.platform.devantler.techAccess-Control-Allow-Origin: https://mail.platform.devantler.tech,Allow-Methods: GET, POST, PUT, DELETE, OPTIONS,Allow-Headers: Authorization, Content-Type, Accept, X-Requested-With,Max-Age: 600,Vary: Originand HSTSAccess-Control-Allow-Originis still Bulwark's origin only, so browsers refuse itCarried into step 3: the JMAP session's
apiUrlis stillhttps://mail.platform.devantler.tech/jmap/.STALWART_PUBLIC_URLmoves it, and the OAuth issuer, tostalwart.platform….Next:
__Host-SSO cookie, fix(sso): name the oauth2-proxy cookie __Host-oauth2_proxy #6666.