Marc Pope
All writing

Stalwart now speaks MAPI to Outlook, 200,000 lines of code with a 2029 expiry date

Stalwart 1.2.0 added MAPI over HTTP, EWS and ActiveSync so classic Outlook connects to an open-source server, the day before Microsoft declared Code Red over Exchange Online.

November 25, 2026 8 min read 122 views Technology Infrastructure
Stalwart now speaks MAPI to Outlook, 200,000 lines of code with a 2029 expiry date

Stalwart 1.2.0 shipped on November 23 and classic Outlook for Windows can now connect to it as if it were an Exchange server. The release adds MAPI over HTTP, Exchange Web Services, Exchange ActiveSync 14.1 and 16.1, and Autodiscover to an open-source mail server written in Rust. Maintainer Mauro D. calls it a drop-in replacement for Microsoft Exchange. The whole thing is in the AGPL Community edition, so you don't pay for the Outlook part.

The next morning Reuters reported that Microsoft had declared an internal Code Red over the Exchange Online outage of November 12 and 13. Jason Henderson, who runs Microsoft 365 Core, called it the most customer impacting incident in the history of Exchange Online in a November 20 memo. His memo also said urgent production fixes took five to six days to reach every server worldwide, and that the new target is one hour. I wrote about that outage while it was still running. Two days of dead mail for a product sold on the promise that you'd never run a mail server again is the backdrop this release landed on.

What 1.2.0 speaks

Four protocols, all served on the same HTTPS port that already carries JMAP and the web UI:

  • MAPI over HTTP, both the EMSMDB mailbox interface and the NSPI address book interface, in cached and online mode
  • Exchange Web Services, schema versions Exchange 2010 SP2 through Exchange 2016
  • Exchange ActiveSync 14.1 and 16.1 for phones and tablets
  • Autodiscover in its POX, SOAP, and JSON dialects

The code is about 200,000 lines. It lives in its own crates behind a single Cargo feature named exchange, so a build without the feature has none of it in the binary. In the official builds it is compiled in but switched off until an operator turns it on. Exchange properties on messages and events are stored as JMAP object metadata and only written when an Exchange client sets them. Delete the metadata and the mailbox is still a plain IMAP and JMAP mailbox. That is a better design than bolting a MAPI store onto the side of the server, which is how most of the past attempts at this went.

Clients the project says work: classic Outlook 2016 and later including the Microsoft 365 Apps build, Outlook for Mac, Apple Mail, Calendar and Contacts on macOS, the stock iPhone and Android mail apps over ActiveSync, Thunderbird over EWS, Evolution, eM Client, and the exchangelib Python library. Mail, calendars, contacts, tasks and notes all come through the one account. Rules written in Outlook compile to Sieve and run on the server with Outlook closed.

The gaps are listed in the announcement, which I respect. No public folders. No archive mailboxes. No mobile device management, so no remote wipe. No RPC over HTTP, which rules out Outlook 2010 and older. No NTLM or Kerberos sign in. Clients authenticate with a password, an app password, or OAuth. In a Windows domain shop that last item is the one that stops the pilot, because users have never typed a mail password and the helpdesk isn't ready for the day they have to.

The client Microsoft won't let you point at your own server

The announcement spends a section on the new Outlook for Windows, and it should. Microsoft's own documentation says the new Outlook does not support Exchange accounts hosted on premises at all. If you add an IMAP account to it instead, the client sends your server name, username and password to Microsoft's cloud, and Microsoft's servers fetch the mail on your behalf. Heise and c't documented that in November 2023, and Stalwart's announcement says the behavior is current. Outlook for iOS and Android work the same way, reaching mailboxes on premises through a Microsoft relay that requires a hybrid Exchange Online setup. Stalwart tells you to keep the "Try the new Outlook" toggle off and use the native phone apps.

So the reach of this release is bounded by the life of classic Outlook, which is reportedly supported until 2029. That gives Stalwart's MAPI implementation a visible expiry date. The project says so itself and describes the Exchange layer as a bridge, with JMAP clients as the destination. Help Net Security reads it the same way.

Mauro D. put the argument in one sentence: "The obstacle to leaving Exchange has rarely been the server. It has been the client." I have run mail for a long time and that matches what I've seen. Postfix and Dovecot have handled SMTP and IMAP at scale for twenty years. What kept Exchange in the rack was calendaring, free/busy, the global address list, and the fact that Outlook wanted MAPI and nothing else. Every open alternative asked users to change clients, and the users said no. This release is the first one I've seen that takes the client as a fixed constraint and moves the server instead.

Where Microsoft left Exchange on premises

Exchange 2016 and 2019 reached end of support on October 14, 2025. The paid Extended Security Update program for them ended in October 2026, per the press reports Stalwart cites. The only supported version you can still install is Exchange Server Subscription Edition, which has no further major versions planned, and whose first cumulative update slipped to an undetermined date in 2026. Meanwhile Microsoft began switching off EWS in Exchange Online in October 2026 and plans to remove it fully in April 2027.

Read those two facts together. Stalwart just implemented EWS, the protocol Microsoft is deleting from its own cloud, because Outlook for Mac and Apple Mail still need it to talk to a server you control. The migration tool, Vandelay, uses that same EWS to pull mailboxes out of Exchange on premises, and uses Microsoft Graph to pull mail, calendars, contacts and OneDrive files out of Microsoft 365. Accounts land in Stalwart over JMAP. Then you move the MX record and the Autodiscover record and Outlook finds the new server on its own.

The 1.2.0 release also replaced Apple's libfdb_c with a native FoundationDB client. Stalwart reports 4.5 to 6.9 times the point read throughput and about half the CPU. The separate stalwart-foundationdb build and Docker image are gone as a result. If you run the FoundationDB backend, read the upgrade notes before you pull the new image, and add the new permissions to your default roles or Exchange clients will fail to authenticate.

Before you believe the pitch

I've watched a lot of software describe itself as a drop-in replacement, and the phrase has never once survived the first week of production. Four things I would test before promising anybody an invisible Monday.

  1. Cached mode with a 20 GB mailbox. Initial OST sync against MAPI over HTTP is where a server learns what Outlook does under load.
  2. Free/busy lookups across the organization, including the working hours and room resource accounts added in 1.2.0, since scheduling is the thing people complain about on day one.
  3. Delegate access and shared calendars for an executive and an assistant, the pairing that breaks on every mail migration.
  4. An iPhone with the native Mail app and a corporate policy that expects remote wipe. Stalwart can't do the wipe, so decide now whether that's acceptable.

The last concern is security, and I'd weigh it above the feature gaps. Exchange's MAPI and EWS endpoints were the way in for ProxyLogon and ProxyShell in 2021, and they have carried a steady stream of CVEs since. Stalwart has now put 200,000 lines of fresh implementations of those same protocols on an Internet facing port. Rust takes memory corruption off the table. It does nothing about authentication logic, SSRF in Autodiscover, or deserialization of attacker controlled MAPI properties. The code reached the public on Sunday and nobody has fuzzed it in anger yet. Turn the feature on for the pilot group, put it behind the same reverse proxy and rate limits you'd give any new service, and watch the logs.

My bet on where this gets used first: small hosting providers and European public sector shops that already wanted off Microsoft's cloud for legal reasons and were stuck only because of Outlook. Windows domain shops that live on Kerberos will wait for that gap to close. And Microsoft will not add support for servers you host yourself to the new Outlook before classic Outlook dies in 2029, because the whole point of the new client is that your password goes through Redmond. Stalwart has a FOSDEM talk booked for January 30, 2027. By then we'll know whether MAPI over HTTP against a Rust server survives contact with a real Outlook fleet, or whether the first CVE arrives first.

Have an infrastructure problem that needs an owner?