Issue Description
TLS certificate not obtained when using HTTP-01 and only MX and A record for mail.domain.com and when only port 443 is behind reverse proxy (caddy) and forwarding to stalwart http:8080.
Three pending tasks are created for the same domain renewal (that’s probably a separate issue).
Expected Behavior
Stalwart should successfully obtain certificate for mail.domain.com because ACME challenge is visible in the reverse proxy log and visible also that request hits Stalwart http endpoint.
Actual Behavior
The ACME task requests multiple certificates (mail, autodiscover, autoconfig, mta-sts) and apparently those are created in a batch and therefore fail because autodiscover, autoconfig, mta-sts DNS record don’t even exist. So the certificate is not even requested.
I believe that there should be a separate option for domain TLS and server TLS certificate, because I only care about server certificate (mail.domain.com) and not about others (so that IMAPS, submission TLS) are using proper valid certificates so that mail clients don’t complain.
Reproduction Steps
- Setup stalwart so that it accepts 25, 465, 993 directly. https traffic is termianted by proxy (caddy) and proxied to stalwart:8080
- Try to obtain a certificate
Relevant Log Output
2026-06-12T13:13:18Z INFO ACME authentication started (acme.auth-start) hostname = “autoconfig.redacted.com”, type = “http-01”, url = “https://acme-staging-v02.api.letsencrypt.org/acme/new-order”
2026-06-12T13:13:18Z INFO ACME authentication started (acme.auth-start) hostname = “ua-auto-config.redacted.com”, type = “http-01”, url = “https://acme-staging-v02.api.letsencrypt.org/acme/new-order”
2026-06-12T13:13:18Z INFO ACME authentication started (acme.auth-start) hostname = “autodiscover.redacted.com”, type = “http-01”, url = “https://acme-staging-v02.api.letsencrypt.org/acme/new-order”
2026-06-12T13:13:18Z INFO ACME authentication started (acme.auth-start) hostname = “mta-sts.redacted.com”, type = “http-01”, url = “https://acme-staging-v02.api.letsencrypt.org/acme/new-order”
2026-06-12T13:13:30Z DEBUG HTTP connection ended (http.connection-end) listenerId = “http”, localPort = 8080, remoteIp = 172.18.0.7, remotePort = 38360, elapsed = 208478ms
2026-06-12T13:13:35Z DEBUG HTTP connection ended (http.connection-end) listenerId = “http”, localPort = 8080, remoteIp = 172.18.0.7, remotePort = 51310, elapsed = 154797ms
2026-06-12T13:13:48Z WARN No TLS certificates available (tls.no-certificates-available) total = 0
Stalwart Version
v0.16.x
Installation Method
Docker
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
Internal
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