FR
live

Stalwart v1.0 beats Postfix and Dovecot in 35 of 38 tests after five years of development

On 26 October 2026, Stalwart shipped its first stable release, five years after the first commit. The all-in-one Rust mail server claims faster performance than the Postfix + Dovecot stack in 35 of 38 benchmark tests, at the price of a schema migration.

A dark wall of identical brass mail slots, one slot open with a single envelope protruding, its amber wax seal glowing.

26 October 2026. Stalwart shipped v1.0, its first stable release, five years after the first commit on 3 October 2021 — back then just an e-mail parsing library in Rust. The project has grown into a complete mail server (JMAP, IMAP, POP3, SMTP, CalDAV, CardDAV, WebDAV), with a spam filter, clustering, and half a dozen storage backends. The point that matters: Stalwart now claims to be “the fastest mail server on the planet,” after beating the Postfix + Dovecot stack in 35 of 38 benchmark comparisons. That is a heavy claim, because that stack is the hidden engine behind docker-mailserver, mailcow, and Mail-in-a-Box.

Two goals: speed and data stability

Stalwart v1.0 was never meant to be just another feature release. The team around maintainer Mauro D. gave it two goals: performance, proven with numbers, and database schema stability, so future upgrades mean installing a new version and nothing more — an end to the disruptive migrations that had made some earlier upgrades “bumpy.”

The performance work was done under a profiler. Parsers were rewritten with SIMD instructions (SSE2, SSSE3, AVX2, NEON) and the SWAR technique, to process 16 or 32 bytes at a time instead of one. Two libraries ship at 1.0 alongside the server: mail-parser 1.0, claimed to be 3 times faster than the mailparse crate, 9 times faster than Dovecot’s own parser, and 15 to 31 times faster than libEtPan!, VMime, and GMime; and encodify, which decodes Base64 22 times faster than the standard crate on an AMD EPYC server.

Underneath, storage was reworked to cut round trips: identifiers assigned in the same transaction that uses them, read-modify-write updates fused into the backend, and zstd compression with dictionaries trained on mail, calendar, and contact data. The new full-text search engine indexes word positions — enabling true phrase search — and returns a body search across a 250,000-message mailbox in under 4 milliseconds.

The head-to-head with Postfix and Dovecot

The number that matters is the benchmark. Stalwart v1.0 was put against Postfix 3.11 (SMTP) and Dovecot 2.4 (IMAP) on identical Azure servers — 8 AMD EPYC Zen 5 vCPUs, 32 GiB RAM, local NVMe — loaded with the same 1,000 mailboxes plus three very large ones of up to 250,000 messages, and given exactly the same work.

The result: Stalwart was faster in 35 of the 38 comparisons. In detail:

  • IMAP: faster than Dovecot in 14 of 15 everyday client operations, by 1.4 to 19 times. A login with a full TLS handshake takes 5.1 ms instead of 28 ms; fetching a 1 MB message is 6 times faster; moving or deleting 100 messages is 18 to 19 times faster.
  • SMTP: Stalwart accepts a message 3.6 to 12 times faster than Postfix, and sustains 5,445 incoming messages per second against 723.
  • Delivery: a message becomes visible to an IMAP client 16 times sooner, and an IDLE client is notified in 3.3 ms instead of half a second.
  • Load: 5.4 times more concurrent IMAP sessions served per second, and 3.8 times more mail relayed before slowing down.

The gap grows with mailbox size: on 250,000 messages, a full-text search takes 3.75 ms versus 136 ms on Dovecot, and moving or deleting 25,000 messages finishes in about a tenth of a second versus 24 to 34 seconds — more than 200 times faster. The three tests Dovecot won are a single operation: marking every message in a mailbox as read at once.

The method is public: scripts, configuration, scenarios, and raw results live in the stalwartlabs/benchmarks repository, with a candid list of caveats — notably the differences in disk-sync behavior between the two systems.

What the migration costs

Schema stability has a price, paid once: Stalwart v1.0 uses a new database layout, and a 1.0 server will not open a store created by an earlier version. Two paths exist:

  • stalwart-migrate, for deployments on v0.16 (prerequisite: be on v0.16.27). The tool converts settings and copies data into a new empty 1.0 store, incrementally: the first copy runs while v0.16 keeps serving users, and only the short final pass requires downtime. Account and message identifiers, IMAP UIDs, and change history are preserved, so clients re-download nothing.
  • The migration proxy and Vandelay, for v0.15 and earlier, or for migrating from Dovecot and Postfix: a proxy places users one at a time on the old or new server, with no downtime per user.

Two changes need attention before upgrading: clusters now require Redis (the fallback to the data store, too slow under load, was removed), and OAuth now follows the open public client profile — something to check if you rely on an external identity provider. The release also adds post-quantum DKIM2 signatures (ML-DSA-44 + Ed25519) and full-text indexing of attached PDF and office documents.

bash
# Run Stalwart v1.0 in a single container (Docker):
docker run -d --name stalwart \
  -p 25:25 -p 143:143 -p 443:443 -p 993:993 \
  -v /opt/stalwart:/opt/stalwart \
  ghcr.io/stalwartlabs/mail-server:v1.0.0

# For a cluster, add a Redis in-memory store (mandatory in v1.0):
#   config: storage.in-memory = "redis" + your Redis cluster URL

Lab numbers that tell the same story

The internal bench — built on Microsoft Azure, more than 30 regions, hundreds of vCPUs running in parallel — has already paid off. The first pass found 64 problems, the second 33 more, all fixed and re-tested. A few examples: reopening a 5-million-message mailbox went from 61 ms to 0.21 ms; a JMAP query on a 5-million-message account from 3.3 seconds to 12 ms; and peak inbound throughput on RocksDB nearly doubled, from 9,690 to 18,394 messages per second. A memory issue — the process held up to 9.6 GiB while the real heap was under 0.4 GiB — was fixed, and memory stays flat across six-hour soak tests.

The server offers six storage backends (RocksDB, PostgreSQL, MySQL, FoundationDB, SQLite) and, in the Enterprise edition, AI models and an AI spam classifier compatible with OpenAI, Anthropic, Gemini, and Ollama APIs. The core stays free and open source: the measured performance does not require the paid edition.

Verdict

If you are starting a self-hosted mail server today, evaluate Stalwart v1.0 before reaching for the historical stack: on a single box, one container replaces Postfix + Dovecot and their plumbing, with a measured 5.1 ms versus 28 ms on a TLS login and a 36 times faster full-text search on large mailboxes. If you already run a proven Postfix/Dovecot stack, don’t migrate for the benchmarks: the real cost is the schema migration and, in a cluster, adding Redis — an effort that only pays off if latency or throughput is concretely hurting you. And if you’re in self-hosting for the long run, weigh the maintenance debt: an all-in-one Rust server with a now-frozen schema promises “install and nothing else” upgrades that the fragmented Postfix/Dovecot stack never offered. Performance makes the headline; schema stability makes the promise.

References

The cyber brief, every Tuesday

The flaws that matter and the patches to apply, in a ten-minute read.

No spam. One-click unsubscribe.
read next

On the same topic

The Raspberry Pi Zero 3 W and Pi 4 Model A surface in the Linux kernel tree

On 27 October 2026, Device Tree files for a Raspberry Pi Zero 3 W and a Raspberry Pi 4 Model A were merged into Raspberry Pi’s official Linux kernel tree. The Zero 3 W would run the BCM2711 SoC, the Pi 4’s chip: the Zero form factor is finally moving to a 64-bit quad-core.

Narratarr brings the Sonarr formula to audiobooks with its own built-in player

On October 29, 2026, noted.lol covered Narratarr, a self-hosted audiobook manager that pairs discovery, downloading, and playback in a single Docker container. For the self-hoster who listens to books, it is one more piece of the *arr stack — worth running on a trusted network, alongside Audiobookshelf rather than as a replacement for it.

← Back to the feed

Type at least two characters.

↑ ↓ navigate ↵ open esc dismiss