Stalwart
Mail and collaboration server in Rust, one binary for everything.
Replaces Microsoft 365, Google Workspace, Proton Mail Business

Who it's for
Organizations that need mail and calendar data on infrastructure they own, with per-mailbox encryption so the host cannot read contents. Stalwart's OpenPGP and S/MIME encryption-at-rest setup satisfies data-residency and confidentiality requirements without depending on a third-party provider's privacy promises.
Your team is comfortable with a managed provider and has no data-residency or audit requirements. Self-hosting adds an operational burden: you manage TLS renewals, backups, and deliverability.
Teams currently running Postfix, Dovecot, and a separate spam filter gain operational simplicity by moving to one binary, one configuration, one admin panel, and one backup covering mail, calendars, contacts, and files. The same identity layer handles authentication for every collaboration surface.
Your organization is already on Microsoft 365 or Google Workspace and your IT team has no appetite for self-managed infrastructure. The per-seat cost of commercial mail services may be lower than the operational time required to run your own mail server.
Stalwart's enterprise edition adds multi-tenancy with domain and tenant isolation, plus SCIM provisioning for automated user management. The clustering model (any node serves any protocol, horizontal scaling by adding nodes) fits a mail hosting service's deployment pattern.
You need multi-tenancy but are not prepared to subscribe to the enterprise edition. The community edition has no multi-tenancy support; running multiple domains for separate organizations requires separate instances.
JMAP delivers real-time email sync over HTTP with push notifications, without polling. Stalwart implements the full JMAP specification including extensions for Calendars, Contacts, and File Storage, giving developers a local test target for JMAP client development without the constraints of a hosted API.
Your client only needs IMAP. Any modern IMAP server works; JMAP is worth the complexity only if your app needs push sync or the richer JMAP data model.
The problem
Running self-hosted email used to mean stitching together a half-dozen separate services: a mail transfer agent, a message store, a spam filter, a calendar server, a contacts server, and a file sharing component. Each one ships with its own configuration format, upgrade cycle, and failure mode. Getting all of them to authenticate against the same directory, share the same TLS certificates, and feed into a single admin view is weeks of integration work before the first user can log in. The situation compounds at scale. Adding high availability means replicating each component separately, often with incompatible clustering approaches. Deliverability tuning (DMARC, DKIM rotation, reputation management) lives in one system while the spam filter lives in another. When something breaks in the pipeline, the failure can originate in any of those five or six services, and tracing it means correlating logs across all of them.
How it works
Serves JMAP for instant multi-device sync, IMAP4rev2 and IMAP4rev1 for every existing client, POP3, and SMTP with DMARC, DKIM, SPF, and ARC authentication in a single process. No separate MTA, relay, or message store to configure.
CalDAV and CardDAV serve existing desktop and mobile clients, with JMAP equivalents for new apps. File storage and sharing over WebDAV and JMAP for File Storage. All collaboration surfaces share one identity layer, one set of access controls, one disk quota, and one backup target.
A statistical classifier, DNS blocklists, sender reputation tracking, greylisting, and optional AI-driven analysis (OpenAI-compatible, Anthropic, Gemini, Ollama) run inside the same process as the SMTP server. Unwanted mail is scored and rejected at SMTP time before reaching the mailbox, with no extra daemon to deploy.
Each mailbox can be encrypted with the user's own OpenPGP key or S/MIME certificate, so even an operator with direct disk access cannot read its contents. An outgoing encryption gateway discovers recipient keys automatically over WKD, keyservers, and DNSSEC. Post-quantum ML-KEM keys are supported for both OpenPGP (RFC 9980) and S/MIME (RFC 9936).
Data store: RocksDB, FoundationDB, PostgreSQL, MySQL, SQLite. Blob store: S3-compatible storage, Azure Blob. Full-text search: built-in (17 languages) or Meilisearch, ElasticSearch, OpenSearch. Auth: LDAP, OIDC, SQL, or built-in with 2FA-TOTP and app passwords.
Any node in the cluster can serve any protocol. Peer-to-peer coordination via Zenoh requires no external service; coordinator-based mode supports Kafka, Redpanda, NATS, or Redis. Kubernetes, Docker Swarm, and Apache Mesos orchestration are supported for automated scaling.
Features
- JMAP and IMAP4 email server in one binary
- Built-in calendars, contacts, and file storage
- Anti-spam filter built into the SMTP server
- Per-mailbox encryption at rest
- Pluggable storage and authentication backends
- Cluster scaling without an external coordinator
How to install
Download the pre-built Stalwart binary or container image for Linux, macOS, Windows, or FreeBSD from GitHub Releases: https://github.com/stalwartlabs/stalwart/releases/latest
Recommended for this setup
Strengths
- Single binary covers the full mail and collaboration stack: JMAP, IMAP, POP3, SMTP, CalDAV, CardDAV, WebDAV, spam filtering, and TLS all run in one process with one configuration file. Organizations that previously ran Postfix, Dovecot, Rspamd, Radicale, and Nextcloud separately eliminate those integration points. Fewer services means fewer upgrade paths, fewer failure modes, and one place to look when something needs attention.
- Operator-transparent encryption at rest: Per-mailbox OpenPGP and S/MIME encryption means the server operator cannot read user mail at rest without the user's private key. Post-quantum ML-KEM support (RFC 9980 for OpenPGP, RFC 9936 for S/MIME) is ahead of most commercial mail services. Proton Mail Business offers a similar promise but only on its closed hosted infrastructure.
- Independently security-audited Rust implementation: Written in memory-safe Rust, which eliminates entire classes of buffer-overflow and use-after-free vulnerabilities common in C-based mail servers like Postfix. The project publishes an independent security audit at stalw.art/blog/security-audit and targets a new audit each time a large section of code is rewritten.
- Full JMAP support, including calendars and contacts: JMAP (RFC 8621) delivers real-time push-based email sync. Stalwart implements the full spec including JMAP for Calendars, JMAP for Contacts, and JMAP for File Storage. Very few self-hosted mail servers implement JMAP at all; none implement the full collaboration extension set.
Trade-offs
- Enterprise features require a paid SELv2 subscription: About 15% of Stalwart's features (multi-tenancy, SCIM provisioning, sharded storage, and live telemetry) are covered by the Stalwart Enterprise License v2 (SELv2) rather than AGPL-3.0. SELv2 allows self-hosting and internal commercial use but forbids redistributing Stalwart as a managed or hosted service to third parties. Organizations running only community edition features are unaffected.
- Self-managed deliverability and DNS: Running your own outbound mail means you own your IP reputation, DKIM rotation, and postmaster inbox. Stalwart automates DKIM key rotation and DNS record updates on Cloudflare, Route53, and Google Cloud DNS, but setting up PTR records and warming a new sending IP still requires manual operator work. Teams without experience managing outbound email deliverability should budget time for this.
- 39 open issues in the tracker as of November 2026: The issue tracker shows 39 open issues. The project ships at least weekly releases and addresses security reports within 24 hours, so the count reflects active development rather than stagnation. New adopters should review open issues that touch their chosen storage backend or protocol clients before deploying.
Tech stack
FAQ
The community edition is AGPL-3.0 licensed and free for all use, including commercial. AGPL-3.0 requires that you share modifications if you run a modified version as a network service. The enterprise edition (multi-tenancy, SCIM provisioning, sharded storage, and live telemetry) requires a paid subscription under the Stalwart Enterprise License v2 (SELv2). SELv2 permits self-hosting and internal commercial use but forbids redistributing Stalwart as a managed or hosted service to third parties.
Spam filtering runs inside the same process as the SMTP server. It combines a statistical classifier with automatic training, DNS blocklists (covering IP addresses, domains, URLs, and hashes), sender reputation by IP, ASN, domain and email, greylisting, trusted-reply tracking, and optional LLM-driven analysis. Scoring and rejection happen at SMTP time before the message reaches the mailbox, with no separate Rspamd or SpamAssassin instance to deploy.
For structured data: RocksDB (default), FoundationDB, PostgreSQL, MySQL, and SQLite. For blob storage: S3-compatible object stores and Azure Blob Storage. For full-text search: a built-in engine covering 17 languages, or external backends including Meilisearch, ElasticSearch, OpenSearch, and PostgreSQL. Redis or Valkey can serve as the in-memory data store. You pick the combination that matches your existing infrastructure.
Yes. The clustering design is peer-to-peer by default using Zenoh: any node can serve any protocol, no external coordinator is required, and you add capacity by adding nodes. For coordinator-based clustering Stalwart supports Apache Kafka, Redpanda, NATS, and Redis. Kubernetes, Docker Swarm, and Apache Mesos orchestration are documented. The enterprise edition adds sharded blob storage for the highest-throughput setups.
No. The community edition under AGPL-3.0 covers the full protocol set (JMAP, IMAP, POP3, SMTP, CalDAV, CardDAV, WebDAV), spam filtering, encryption at rest, automatic TLS, authentication via LDAP/OIDC/SQL, clustering, and the web admin panel. The enterprise edition adds features mainly useful at scale or for managed hosting: multi-tenancy, SCIM provisioning, sharded storage, and live telemetry. About 85% of the codebase ships under the community edition license.