Issue Description
After completing the full setup I am left on the “Setup Complete” screen. With a blue box telling me there are credentials above to continue administering my server. There are no credentials, likely due to the LDAP setup.
I thus continued using the recovery admin.
Sadly the LDAP setup still does not let me log in even though the authentication succeeds.
Expected Behavior
-
Remove the incorrect statement that there are login credentials on the final bootstrapping screen (or add them, or link to the recovery admin docs in case it’s needed).
-
Improved LDAP/auth debug logs that tell me what to fix or simply letting me log in with the current setup.
Actual Behavior
Relatively unclear log, with not really a path to fix.
stalwart-mail | 2026-11-04T22:25:10Z INFO Unauthorized access (security.unauthorized) listenerId = "https", localPort = 443, remotePort = 53294, reason = "authenticate", accountId = 1, remoteIp = 172.18.0.7`
Reproduction Steps
- Configure stalwart v1 from scratch with defaults except directory = LDAP
- LDAP server is Kanidm
- Try to match the LDAP directory config as follows:
Directory
- Description: kanidm
Connection
- Server URL: ldaps://idm.melijn.com:3636
- Timeout: 15 seconds
- Enable TLS: true
- Allow Invalid Certificates: true
Bind
- Base DN: dc=idm,dc=melijn,dc=com
- Bind DN: dn=token
- Bind Secret: (Type=Secret Value; Secret=redacted)
- Use Bind Authentication: true
Filters
- Login Filter:
(&(|(objectClass=person)(objectClass=service_account))(|(uid=?)(spn=?)(name=?))) - Recipient Filter:
(&(|(objectClass=person)(objectClass=service_account))(|(mail=?))) - Member of Filter: blank
Attributes
- Account Type Attribute:
objectClass - Description Attribute:
description - Primary E-mail Attribute:
mailemailprimary - E-mail Alias Attribute:
emailalternative - Member Of Attribute:
memberOf - Password Attribute: blank
- Password Changed Attribute: blank
- Group Object Class:
groupOfNames
- See
Invalid username or password. Please try again.on the login screen and the logs are linked below.
Relevant Log Output
stalwart-mail | 2026-11-04T22:25:09Z DEBUG HTTP request URL (http.request-url) listenerId = "https", localPort = 443, remoteIp = 172.18.0.7, remotePort = 53294, url = "/api/auth"
stalwart-mail | 2026-11-04T22:25:09Z TRACE Expression evaluation result (eval.result) listenerId = "https", localPort = 443, remoteIp = 172.18.0.7, remotePort = 53294, name = "Http with id singleton", property = "allowedEndpoints", result = "Integer(200)"
stalwart-mail | 2026-11-04T22:25:09Z TRACE HTTP request body (http.request-body) listenerId = "https", localPort = 443, remoteIp = 172.18.0.7, remotePort = 53294, headers = [["host", "mail.melijn.com"], ["user-agent", "Mozilla/5.0 (X11; Linux x86_64; rv:159.0) Gecko/20100101 Firefox/159.0"], ["accept", "application/json"], ["accept-language", "en-US,en;q=0.9"], ["accept-encoding", "gzip, deflate, br, zstd"], ["content-type", "application/json"], ["content-length", "502"], ["origin", "https://mail.melijn.com"], ["dnt", "1"], ["sec-gpc", "1"], ["connection", "keep-alive"], ["sec-fetch-dest", "empty"], ["sec-fetch-mode", "cors"], ["sec-fetch-site", "same-origin"], ["priority", "u=0"], ["pragma", "no-cache"], ["cache-control", "no-cache"]], contents = "{\"type\":\"authCode\",\"accountName\":\"merlijn\",\"accountSecret\":\"redacted\",\"query\":\"response_type=code&client_id=https%3A%2F%2Fmail.melijn.com%2Faccount%2Foauth-client.json&redirect_uri=https%3A%2F%2Fmail.melijn.com%2Faccount%2Foauth%2Fcallback&code_challenge=t4E-IILKq4RlAtUnn8hYlFLIteji3BZs-fv3fKer0fI&code_challenge_method=S256&state=27527a1e9b7fc85a6b95ce8d3fefd8cf&login_hint=merlijn&prompt=login&scope=openid&resource=https%3A%2F%2Fmail.melijn.com\"}", size = 502
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Authentication warning (auth.warning) accountName = "merlijn", reason = "No domain in username"
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Cache hit (cache.hit) key = "melijn.com", name = "domainName"
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Cache hit (cache.hit) key = 1, name = "domainId"
stalwart-mail | 2026-11-04T22:25:09Z TRACE LDAP query executed (store.ldap-query) query = "(&(|(objectClass=person)(objectClass=service_account))(|(uid=merlijn)(spn=merlijn)(name=merlijn)))", result = [["emailprimary", "mainemail@mydomain"], ["emailalternative", "comma separated list of cool email addresses@mydomain"], ["objectclass", "account, memberof, object, person, posixaccount"], ["memberof", "[email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com, [email protected],dc=idm,dc=melijn,dc=com"], ["mail", "[email protected], [email protected], [email protected]"], "[email protected],dc=idm,dc=melijn,dc=com"]
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Cache hit (cache.hit) key = "melijn.com", name = "domainName"
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Cache hit (cache.hit) key = 1, name = "domainId"
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Cache hit (cache.hit) key = "merlijn", domain = 1, name = "email"
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Cache hit (cache.hit) key = "melijn.com", name = "domainName"
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Cache hit (cache.hit) key = 1, name = "domainId"
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Cache hit (cache.hit) key = "admin", domain = 1, name = "email"
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Cache hit (cache.hit) key = "melijn.com", name = "domainName"
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Cache hit (cache.hit) key = 1, name = "domainId"
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Cache hit (cache.hit) key = "toxicmushroom", domain = 1, name = "email"
stalwart-mail | 2026-11-04T22:25:09Z DEBUG Cache hit (cache.hit) key = 1, name = "accessToken"
stalwart-mail | 2026-11-04T22:25:09Z INFO Authentication successful (auth.success) listenerId = "https", localPort = 443, remoteIp = 172.18.0.7, remotePort = 53294, accountName = "[email protected]", accountId = 1
stalwart-mail | 2026-11-04T22:25:10Z INFO Unauthorized access (security.unauthorized) listenerId = "https", localPort = 443, remotePort = 53294, reason = "authenticate", accountId = 1, remoteIp = 172.18.0.7
stalwart-mail | 2026-11-04T22:25:10Z TRACE HTTP response body (http.response-body) listenerId = "https", localPort = 443, remoteIp = 172.18.0.7, remotePort = 53294, contents = "{\"type\":\"failure\"}", code = 200, size = 18
Stalwart Version
v1.x
Installation Method
Docker
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
LDAP
Additional Context
Setup was copied from a working v0.15 instance.
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