EmailServer
Self-Hosted Email on a Single Stalwart Binary
Inside the project
01 / 01EmailServer
The brief
A problem worth
building around.
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.
Our approach
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.
The experience
What it lets
people do.
The capabilities that turn the underlying engineering into a usable product.
- 01
All-in-one SMTP, IMAP, and JMAP server
- 02
Built-in spam filtering, no separate daemon
- 03
DKIM signing and SPF/DMARC validation in-process
- 04
Web admin UI behind Traefik HTTPS
- 05
SMTP STARTTLS and SMTPS/IMAPS TLS passthrough
- 06
Let's Encrypt certs auto-extracted from acme.json
- 07
Certificates auto-renew every 90 days
- 08
Multi-domain support
Project record
What came out of it.
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
Under the hood
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. Get in touch and tell us about yours.