Issue Description
The Autodiscover V2 JSON endpoint returns 404:
curl -v -X POST
‘https://example.com/autodiscover/[email protected]&Protocol=AutodiscoverV1’
Response:
HTTP/1.1 404 Not Found
However, the XML endpoint works:
curl -v https://example.com/autodiscover/autodiscover.xml
Stalwart Version
v0.16.x
Installation Method
Binary (Linux)
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
SQL
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on
Thanks for the detailed report. Based on the source code and docs, here’s what’s happening:
The Autodiscover V2 JSON endpoint (autodiscover.json) was added in the current release cycle — but the URL format you’re using may not match what Stalwart expects.
A few things to check:
-
URL path casing: The server matches autodiscover.json case-insensitively, but the path structure matters. The Autodiscover v2 URL format Microsoft clients use is:
https://example.com/autodiscover/[email protected]&Protocol=AutodiscoverV1
Make sure the path is exactly /autodiscover/autodiscover.json (not a subdomain variant like autodiscover.example.com/autodiscover.json).
-
Subdomain vs. root domain: The XML endpoint at example.com/autodiscover/autodiscover.xml working while the JSON endpoint doesn’t could indicate a routing issue if you’re using a reverse proxy (nginx, Caddy, etc.) in front of Stalwart. Check that your proxy isn’t intercepting or blocking the .json endpoint.
-
No special configuration is needed: According to the docs, no protocol-specific configuration is required — both v1 and v2 Autodiscover are served automatically to any client reaching Stalwart over HTTPS on port 443. If the XML path works, Stalwart is serving the domain correctly, which makes a proxy or routing issue the most likely culprit.
To narrow it down, try curling Stalwart directly (bypassing any proxy) to see if the 404 originates from Stalwart itself or from something in front of it.
The relevant documentation is at https://stalw.art/docs/server/autoconfig.
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong. If you found it useful, mention @helpbot in any reply to ask follow-up questions and the bot will respond again.