Managed Mail Server (Stalwart v1.2.1)
Host custom-domain mailboxes via the optional Stalwart v1.2.1 JMAP sidecar and automated DNS verification.
Bryfo can provision and manage custom-domain mailboxes through /admin/mailserver over standard HTTP/JMAP (urn:stalwart:jmap), IMAP, and SMTP while keeping Bryfo itself 100% MIT licensed.
1. Headless Sidecar Bootstrap
cd deploy
./stalwart-bootstrap.sh mx.example.com
docker compose -f docker-compose.yml -f docker-compose.mailserver.yml up -d- Network Isolation:
stalwartattaches only tomailserver-internal(shared withapp), keepingpostgresandvalkeyisolated on the backend network. - Persistent Volumes: Back up both
stalwart-etc(/etc/stalwart) andstalwart-data(/var/lib/stalwart,UID/GID 2000). - Zero
:80/:443Conflict: Exposes0.0.0.0:25(inbound MX) and loopback127.0.0.1:465/127.0.0.1:993(BRYFO_MAIL_CLIENT_BIND_IP) plus127.0.0.1:18095for ACME/.well-known/acme-challenge/proxying.
2. Domain DNS & Mailbox Policies
- Connect Stalwart in
/admin/mailserver(POST /api/v1/admin/mailserver/testverifies JMAP, IMAP, and SMTP non-destructively). - Add your domain (
ed25519orrsa2048DKIM), publish the generated_bryfo-verifyTXT,MX,SPF,DKIM, andDMARCrecords, and run Verify DNS ( ensure VPS IPv4/IPv6 PTR records matchmx.example.com). - Keep
admin_onlyallocation for private assignment, or switch verified domains toself_claimwith per-user mailbox caps (1–50), storage quotas, minimum plan tiers, and custom reserved localparts. - In
self_hostedmode, optionally enable external IMAP/SMTP client access to issue per-mailbox one-timeAppPasswordcredentials (cloudmode keeps external submission disabled so sending limits and circuit breakers cannot be bypassed).
/admin Control Plane & Hot Settings
Configure OIDC, XOAUTH2, S3/R2 storage, AI routing, and 5 emergency circuit breakers live without container restarts.
Operations, Backups, Key Rotation & Cloud Mode
Upgrades, age-encrypted disaster recovery drills, zero-downtime KeyRing rotation, Prometheus/Grafana, and cloud billing.