Stalwart: Open-source Microsoft Exchange replacement

Stalwart, an open source mail server, shipped version 1.2.0 with support for the protocols Exchange clients speak: MAPI over HTTP, Exchange Web Services (EWS), Exchange ActiveSync and Autodiscover. Outlook, Apple Mail and the built-in apps on phones connect to it as they would to an Exchange server, with mail, calendars, contacts, tasks and notes in one account. The feature is part of the free Community edition, licensed under the AGPL.

Stalwart Exchange replacement

If you still run Exchange on your own servers, the calendar is against you. Exchange 2016 and 2019 reached end of support on October 14, 2025, and the paid Extended Security Update program reportedly ended in October 2026, so those servers get no fixes. Subscription Edition, the one supported on-premises version left, gets none of the cloud features, and Microsoft’s new Outlook for Windows does not support on-premises accounts. Administrators are left choosing between a server that will not grow and Microsoft’s cloud, where mail sits within reach of US law, including the CLOUD Act.

Outlook stays, the server moves

“The obstacle to leaving Exchange has rarely been the server. It has been the client,” says Stalwart’s maintainer. Moving to a standard IMAP and CalDAV server meant asking every user to switch mail programs, or to run Outlook in a reduced IMAP mode where calendars and contacts stop syncing. With 1.2.0, an administrator migrates the mailboxes, points DNS at Stalwart, and staff open the same Outlook on Monday that they closed on Friday.

Classic Outlook 2016 and later connects over MAPI and EWS. Outlook for Mac and Apple Mail use EWS, and iPhones and Android apps such as Gmail and Samsung Email use ActiveSync. Every client lands in the same account, and rules built in Outlook run on the server even after Outlook closes.

What is missing

Stalwart has no public folders, archive mailboxes, mobile device management, RPC over HTTP for Outlook 2010 and earlier, or NTLM and Kerberos sign-in. The new Outlook is the larger gap, and it works with no self-hosted server, Exchange included. Given an IMAP account, it sends the server name, user name and password to Microsoft, whose cloud fetches the mail. A company that self-hosts to keep its mail away from Microsoft would end up handing Microsoft the password. Stalwart tells users to leave the “Try the new Outlook” toggle off.

What it costs to carry

The Exchange code adds about 200,000 lines to Stalwart. It lives in separate crates behind one Cargo feature, ships disabled in official builds, and writes nothing to an account until an Exchange client connects. Vandelay, Stalwart’s import tool, pulls mailboxes from on-premises Exchange over EWS and from Microsoft 365 through Microsoft Graph.

The project treats all of this as a bridge with an expiry date. EWS is due to vanish from Exchange Online in April 2027, and classic Outlook is reportedly supported until 2029. Stalwart expects users to switch to clients built on open standards such as JMAP during that window.

Stalwart is available for free download on GitHub.

Must read:

Subscribe to the Help Net Security ad-free monthly newsletter to stay informed on the essential open-source cybersecurity tools. Subscribe here!

Don't miss