
Stalwart, the open-source mail and collaboration server written in Rust, has reached version 1.0 after five years of development. For anyone running their own mail, this matters for two reasons. The project now calls itself stable and has frozen its database schema, and the release adds a large set of performance changes. If you have been watching Stalwart as a possible replacement for a Postfix and Dovecot stack, or as a self-hosted option alongside a cPanel mail setup, this is a good time to look at it properly.
What Stalwart Is
Stalwart is a single server that covers both mail delivery and mailbox access. It handles SMTP, IMAP, POP3 and JMAP, the newer JSON-based mail protocol. It also includes collaboration features: CalDAV for calendars, CardDAV for contacts and WebDAV for file sharing. A traditional Linux mail host usually puts several separate daemons together for this. Stalwart puts all of it in one service with one configuration model.
It can store its data in several backends: RocksDB, PostgreSQL, MySQL, SQLite and FoundationDB. Version 1.0 adds optimizations specific to each of these, cuts unnecessary storage operations, makes transactions more efficient, and uses zstd compression tuned for mail, calendar and contact data.
What Is New in 1.0
Faster parsing and encoding
Several core parsers have been rewritten with SIMD and SWAR techniques, so the server processes several bytes at once instead of one at a time. The mail-parser library was rebuilt from scratch, and the project says it is up to 3x faster than Rust’s mailparse crate and 9x faster than Dovecot’s parser. A new library called encodify speeds up Base64 and quoted-printable handling, which matters on any server that processes a lot of attachments.
Caching and search
A redesigned cache lets common IMAP operations such as sorting, threading and reading flags run with very little database access. Full-text search has been rewritten too. It now supports phrase search, word stemming, prefix matching and compressed indexes. The project’s own benchmarks show a search across 250,000 messages finishing in under 4 milliseconds. Stalwart can also index the contents of PDF, Microsoft Office, OpenDocument, EPUB and RTF files, whether they arrive as attachments or sit in its built-in file storage.
Security and authentication
- Post-quantum DKIM2 signatures that combine ML-DSA-44 with Ed25519
- Wider OAuth and OpenID Connect support
- Improved authentication and storage configuration
- Stronger protection against server-side request forgery (SSRF)
- Support for JMAP and IMAP metadata
About the Benchmarks
The project tested Stalwart against Postfix 3.11 and Dovecot 2.4 on identical Azure servers with 8 AMD EPYC Zen 5 vCPUs, 32 GB of RAM and local NVMe storage. It reports winning 35 of 38 comparisons. Incoming SMTP reached 5,445 messages per second against 723 for Postfix, and IMAP was faster in 14 of 15 common operations, by between 1.4x and 19x.
Treat these as vendor benchmarks. Readers have already questioned how fair some of the comparisons are. For most small businesses, raw throughput is not the bottleneck anyway. Deliverability, spam filtering, backups and the time it takes to administer the server matter more. The useful point is that Stalwart is not giving up performance for convenience.
Upgrading an Existing Stalwart Install
The schema is now final, so future releases should upgrade in place without disruptive migrations. Getting to 1.0 is the exception. Version 1.0 cannot open databases created by earlier versions, so existing installations need a one-time migration.
If you run Stalwart 0.16.27, the project provides a stalwart-migrate tool. It copies data across incrementally while the old server keeps running, which keeps downtime short. If you are on an older release, plan to reach 0.16.27 first. A sensible order:
- Take a full backup of the data store and configuration, and test that the backup restores.
- Upgrade the existing server to 0.16.27 if it is on an older release.
- Stand up the 1.0 server and run
stalwart-migratewhile the old server is still serving mail. - Lower DNS TTLs ahead of time if the cut-over changes IP addresses.
- Switch traffic over, then check SMTP delivery, IMAP and JMAP logins, calendars and contacts.
- Keep the old instance read-only for a few days in case you need to roll back.
Should You Move Your Mail to Stalwart?
For a new self-hosted mail server, Stalwart 1.0 is worth a serious look. One service in place of several, a built-in calendar and contacts server, and a choice of database backends make it easier to run than a hand-built stack. For a mature Postfix and Dovecot setup with years of custom rules, the case is weaker. Test it in parallel first. Whichever you choose, the basics stay the same:
- Correct SPF, DKIM and DMARC records, plus a matching PTR record for the sending IP
- Valid TLS certificates on every client-facing port
- Monitoring of queues, disk space and blocklist status
- Regular, tested backups of mailboxes and configuration
How TechProvidence Can Help
TechProvidence builds and manages mail servers for businesses, from Postfix and Dovecot to cPanel mail and newer platforms such as Stalwart. We can test Stalwart against your current setup, plan and run the migration with minimal downtime, and look after DNS authentication, deliverability, backups and ongoing security. If you are thinking about a change to your mail platform, contact us.
Source: Linuxiac


