Skip to content

Overview

Many organisations run clients that speak only Microsoft’s protocols. Classic Outlook for Windows connects to a mail server through MAPI over HTTP, Apple Mail, Calendar and Contacts offer an Exchange account type that uses Exchange Web Services, and the mail apps on phones set up corporate accounts through Exchange ActiveSync. Stalwart serves these protocols itself, so such clients connect to it directly, as they would to a Microsoft Exchange server, with mail, calendars, contacts and tasks in one account.

Exchange support is disabled until the administrator enables it. While it is disabled, the server behaves as if the Exchange protocols did not exist. Configuration describes how to enable it and what changes when it is enabled.

The Exchange protocols are another way into the same accounts. They do not keep a separate copy of the mailbox: a message filed in Outlook is in the same mailbox that IMAP and JMAP clients see, an event created on a phone is in the calendar that CalDAV clients read, and a contact added in Apple Contacts appears in the CardDAV address book. A user can therefore keep Outlook on the desktop, a CalDAV client on another machine and a JMAP webmail in the browser, all on one account.

Outlook and the other Exchange clients also store data that no standard protocol has a place for, such as extended properties, reminder state and client settings. Stalwart keeps these properties next to the item they belong to, and Exchange clients read them back. IMAP, JMAP and DAV clients do not see them. Rules created in Outlook are stored as account mail rules, which the server runs as Sieve, so they apply whichever client is open.

Stalwart implements the following Microsoft protocols, all served by the HTTP listener on the same port as JMAP and the WebUI:

ProtocolUsed byPath
MAPI over HTTP (EMSMDB and NSPI)Classic Outlook for Windows, in cached and online mode/mapi/emsmdb, /mapi/nspi
Exchange Web Services (EWS)Apple Mail, Calendar and Contacts, EWS libraries and other EWS clients/EWS/Exchange.asmx
Exchange ActiveSync, versions 14.1 and 16.1Mail apps on phones and tablets/Microsoft-Server-ActiveSync
Autodiscover (POX, SOAP and JSON)Every Exchange client, to find the other endpoints/autodiscover/
Offline address book (OAB)Outlook in cached mode/OAB/

MAPI over HTTP is the protocol of classic Outlook. EMSMDB carries the mailbox: folders, messages, calendar items, contacts, tasks, rules and the incremental synchronisation that cached mode relies on. NSPI is the address book service through which Outlook resolves names and browses the global address list (GAL). In cached mode Outlook also downloads the offline address book, a copy of the GAL that it searches without contacting the server.

Exchange Web Services is a SOAP API over HTTPS. It covers mail, calendars, contacts, tasks, folders, sharing and delegates, free/busy, inbox rules, out of office and name resolution, with pull and streaming notifications for changes. The version that the server reports to EWS clients is set in the Exchange object.

Exchange ActiveSync (EAS) is the protocol of mobile mail apps. It synchronises mail, calendars, contacts, tasks and notes, and keeps a request open (Ping) so that the device learns of new mail at once without polling. Stalwart offers protocol versions 14.1 and 16.1 only.

Autodiscover tells a client which endpoints to use from the email address and password alone. It is described in Autodiscover and DNS.

The following clients have been tested against Stalwart:

  • Classic Outlook for Windows, from Office LTSC 2024, in cached and online mode
  • Apple Mail, Calendar and Contacts on macOS, through an Exchange account (EWS)
  • Gmail and Nine on Android, over ActiveSync 14.1 and 16.1
  • TbSync for Thunderbird, over ActiveSync (calendars, contacts and tasks)
  • The EWS libraries exchangelib and ews-rs, and the ActiveSync libraries go-activesync and pyactivesync
  • Microsoft’s Exchange protocol test suites

Outlook for Mac, the new Outlook for Windows, Outlook for iOS and Android, iOS Mail, Samsung Email and DavMail have not been tested. The pages on Outlook for Windows, Apple clients and mobile devices explain what each client needs.

Some parts of an Exchange deployment have no counterpart in Stalwart. The following are not offered:

  • RPC over HTTP (Outlook Anywhere). Outlook connects through MAPI over HTTP only.
  • NTLM and Kerberos. The Exchange endpoints accept HTTP Basic authentication and OAuth bearer tokens only. Outlook and the Apple clients sign in with Basic authentication, using an app password for accounts with two-factor authentication.
  • Public folders and archive mailboxes. Neither exists in Stalwart.
  • Mobile device management. ActiveSync policies are not enforced and remote wipe is not available.

Differences from Exchange lists the behaviour that differs from a Microsoft Exchange server, protocol by protocol.