Stalwart 1.0 Open-Source Mail Server Reaches Its First Stable Release

After five years of development, Stalwart reaches version 1.0 with performance optimizations, database stability, and email collaboration capabilities.

After five years of development, Stalwart, the open-source mail and collaboration server written in Rust, has reached version 1.0, marking its first stable release, announced as “The Fastest Mail Server on the Planet.”

For those unfamiliar, it is an all-in-one email server that supports SMTP, IMAP, POP3, and JMAP. As previously reported, the project has also expanded into a broader collaboration platform, adding support for calendars, contacts, and file sharing through CalDAV, CardDAV, and WebDAV.

One major improvement in version 1.0 comes from rewriting several core parsers using SIMD and SWAR techniques, allowing the server to process multiple bytes simultaneously instead of examining them individually.

The project’s mail-parser library has been rewritten from scratch, with developers reporting performance up to three times faster than Rust’s mailparse library and nine times faster than Dovecot’s parser. A new encoding library, encodify, also speeds up Base64 and quoted-printable processing.

Database performance has received improvements too. Stalwart now reduces unnecessary storage operations, uses more efficient transactions, and applies zstd compression optimized for email, calendar, and contact data.

The developers have introduced backend-specific optimizations for RocksDB, PostgreSQL, MySQL, SQLite, and FoundationDB. Additionally, a redesigned caching system lets many common IMAP operations, including sorting, threading, and message flag retrieval, run with minimal database access.

Another notable improvement is the completely rewritten full-text search engine. It now supports phrase searches, word stemming, and prefix matching, using compressed indexes to improve efficiency. According to the project’s benchmarks, searching 250,000 messages takes less than four milliseconds.

The Stalwart team conducted extensive performance testing against Postfix 3.11 and Dovecot 2.4, using identical Azure servers with eight AMD EPYC Zen 5 vCPUs, 32 GB of RAM, and local NVMe storage.

In these tests, Stalwart outperformed the Postfix/Dovecot combination in 35 of 38 comparisons. For example, it handled 5,445 incoming SMTP messages per second, compared to Postfix’s 723. It also performed better in 14 of 15 common IMAP operations, with improvements ranging from 1.4 to 19 times.

Apart from performance, version 1.0 introduces document content indexing. Stalwart can extract and search text within PDF, Microsoft Office, OpenDocument, EPUB, and RTF files, whether stored as email attachments or in its integrated file storage.

Other additions include JMAP and IMAP metadata support, post-quantum DKIM2 signatures combining ML-DSA-44 and Ed25519, and expanded OAuth and OpenID Connect capabilities. The release also improves authentication, storage configuration, and protection against server-side request forgery.

Finally, an important change concerns the database schema, which has been finalized. The developers say future releases should support in-place upgrades without the disruptive database migrations required by some earlier versions.

However, upgrading existing installations to version 1.0 still requires a one-time migration because the new release cannot directly open databases created by previous versions.

For installations running Stalwart 0.16.27, the new stalwart-migrate tool transfers data incrementally while the old server continues operating, minimizing downtime.

For more information, see the official announcement or visit the project’s GitHub repository.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

Your email address will not be published. Required fields are marked *