Set up JMAP on Stalwart
Stalwart is an open source mail server with JMAP, IMAP and SMTP in one program. JMAP is on from the start, along with JMAP for contacts, calendars and files, so most of the work is making sure apps can reach it.
1. Install Stalwart
Follow Stalwart's own install guide. Its web admin walks you through your domain, users and certificates.
2. Set the public address
Stalwart builds the addresses in its JMAP session and its /.well-known/jmap answer from its public URL. Set it to the address people will actually use, such as https://mail.example.com. If it's wrong, apps find the session but then try to send requests to the wrong place.
3. https
JMAP only works over https. Stalwart can get certificates on its own with ACME (Let's Encrypt), or you can put it behind a reverse proxy that handles them.
4. Behind a reverse proxy
- Pass every path through to Stalwart's web listener, including
/.well-known/jmapand/jmap/. - Allow WebSocket upgrades, so apps can use JMAP over WebSocket.
- Stalwart blocks addresses that look like they're scanning it. All traffic through a proxy comes from one address, so add your proxy to its allowed list, or turn on the PROXY protocol so Stalwart sees the real visitor.
5. Let apps find you from your email address
If your addresses are @example.com but Stalwart runs at mail.example.com, apps need a pointer. Use the setup helper to make the _jmap._tcp DNS record and the /.well-known/jmap redirect.
| Stalwart | |
|---|---|
| Session URL | https://your-mail-host/jmap/session (the well-known address redirects there) |
| Signing in | Username and password, app passwords, or OAuth |
| Alerts | EventSource, WebSocket and Web Push |
| Also over JMAP | Contacts, calendars, files, Sieve filters and quotas |
Check it works
Put your email domain into the checker. It should find the session and say it asks you to sign in. Add a token or password to see the full list of what Stalwart offers, then try a request in the playground.
Words you don't know? See the glossary.