· via Hacker News – Front Page (native)
Stalwart 1.0: open-source JMAP mail server lands first stable release after five years
Stalwart, the open-source Rust mail server, has shipped v1.0 after five years, adding rewritten SIMD parsers, a new search engine and a finalised database schema that ends disruptive upgrades.

Five years from parsing library to stable release
Stalwart, an open-source mail and collaboration server, has shipped version 1.0, its first stable release. According to the project's announcement, published 26 October 2026, the effort began on 3 October 2021 with the first commit to mail-parser, a small Rust library for parsing e-mail. Over five years that library grew into a complete server speaking JMAP, IMAP, POP3 and SMTP, alongside CalDAV, CardDAV and WebDAV, with a built-in spam filter, clustering support and roughly half a dozen storage backends.
The team says version 1.0 was deliberately not a feature release. It had two goals: make every part of the server fast and prove it with numbers, and finalise the database schema so that future upgrades mean installing a new version and nothing more, without the disruptive migrations some earlier releases required. One feature did make the cut — full-text search can now index text inside PDF and office documents.
Parsers rewritten with SIMD and SWAR
Much of the work happened under a profiler: close to 200 commits touching more than 1,300 files, most aimed at making something faster or lighter. A core observation was that a mail server spends a surprising amount of time scanning for specific bytes — MIME boundaries, the ends of header lines, IMAP tags — normally one byte at a time.
The release attacks this with two techniques. SIMD uses the wide vector registers of modern processors (SSE2, SSSE3 and AVX2 on x86-64, NEON on ARM) to compare or transform 16 or 32 bytes with a single instruction, while SWAR applies the same idea with ordinary 64-bit arithmetic, testing eight bytes at once on any CPU. Stalwart's announcement claims its rewritten mail-parser 1.0 is three times faster than the Rust mailparse crate, nine times faster than Dovecot's own parser, and 15 to 31 times faster than libEtPan!, VMime and GMime on a full parse — figures from the project's own benchmarks. A new encoding library, encodify, adds SIMD kernels for Base64, Base32 and quoted-printable, and reportedly decodes a MIME-wrapped Base64 attachment 22 times faster than the standard Rust base64 crate on an AMD EPYC server.
Above the parsers, the IMAP command parser is now table-driven and scans whole runs of bytes, while the SMTP parser, the JSON parser behind JMAP, the spam-filter tokenizers and the HTML-to-text converter all use SWAR scanning. The expression language administrators use for routing and filtering decisions now compiles to compact bytecode evaluated in a recycled memory arena.
Storage, caching and search reworked
Fast parsing is wasted if every request then waits on the database, so identifiers are now assigned inside the same write transaction that uses them, read-modify-write updates run as merge operations in the backend, and stored objects are compressed with zstd using dictionaries trained on mail, calendar and contact data. Each backend received individual tuning, from bloom filters and column families in RocksDB (with hot counters spread across up to 256 slots) to prefetched reads in FoundationDB and tuned WAL settings in SQLite.
A redesigned cache subsystem keeps each account's message index in memory in a compact packed form, so IMAP sorting, threading, flag fetches and searches on message properties are answered with few or no database reads. Very large accounts get their own budgeted tier, and cache snapshots can be swapped to local disk, Redis or the blob store instead of rebuilt.
The full-text search engine was also rebuilt from the ground up. The old design stored one bitmap per word with no notion of word positions; the new engine stores postings in blocks of 65,536 documents and keeps word positions for every message, making genuine phrase searches possible. On a mailbox of 250,000 messages, the project says a full-text search of every message body now returns in under 4 milliseconds.
Stress tested on hundreds of vCPUs
To validate the work, the team built a dedicated benchmarking and stress-testing lab on Microsoft Azure, spanning more than 30 regions, with up to 18 complete labs running in parallel on several hundred vCPUs. A catalogue of 35 kinds of test across more than 550 test cells covers every major protocol including JMAP push over EventSource and WebSocket, a three-node cluster under mixed load, mailboxes of up to 5 million messages, 100,000 accounts on a single server, mail queues of 10 million messages, floods of a million DMARC and TLS reports, and abuse scenarios such as 20,000 new connections per second, mass logins and hostile messages.
Why it matters
Self-hosting e-mail has traditionally meant stitching together Postfix, Dovecot and friends, or adopting heavyweight groupware. Stalwart bundles the modern protocol stack — including JMAP, the JSON-based alternative to IMAP — into a single server that scales from SQLite on a small box to clustered FoundationDB deployments. The frozen database schema removes one of the scariest operational risks in self-hosting: an upgrade that mangles your only copy of your mail. The performance numbers are the project's own and will need independent confirmation as deployments grow, but a 1.0 that prioritises stability over new features is a strong signal for anyone running, or considering running, their own mail server.
- #open-source
- #jmap
- #rust
- #self-hosting