EmailServer
Self-Hosted Email on a Single Stalwart Binary

Challenge
Businesses want email they control: deliverability, security, and data ownership. Cloud email gives up customization and data sovereignty. The traditional self-hosted answer means wiring together a separate MTA, IMAP server, spam filter, and webmail—several daemons that each need configuring, hardening, and patching, or mail silently fails.
Solution
EmailServer replaces that multi-daemon stack with Stalwart Mail Server, a single Rust binary that speaks SMTP, IMAP, and JMAP, filters spam, and signs DKIM internally. Traefik sits in front: it terminates HTTPS for the web admin UI and routes the SMTP, SMTPS, submission, and IMAPS ports over TCP. A traefik-certs-dumper sidecar extracts Let's Encrypt certificates from Traefik's acme.json into a shared volume so Stalwart can serve STARTTLS and TLS passthrough with auto-renewing certs. The whole thing ships as one docker-compose file.
Results
- Single Stalwart binary replaces a 5+ daemon mail stack
- SMTP, IMAP, spam filtering, and DKIM handled in-process
- DKIM/SPF/DMARC authentication built-in
- Traefik routes SMTP/SMTPS/Submission/IMAPS over TCP
- Automated Let's Encrypt SSL via Traefik + certs-dumper
- One docker-compose deployment to Docker Swarm
System Architecture
Single Stalwart mail binary behind Traefik, with Let's Encrypt certs auto-dumped for TLS
Single Stalwart mail binary behind Traefik, with Let's Encrypt certs auto-dumped for TLS
Facing Similar Challenges?
Every business is different, but the problems tend to rhyme. If someone sent you, get in touch and tell us about yours.