nodemailer / wildduck

Opinionated email server
https://wildduck.email/
European Union Public License 1.2
1.91k stars 266 forks source link

Not able to generate new certificates #696

Closed bramhoven closed 4 months ago

bramhoven commented 4 months ago

I have enabled autogenerate in the configuration and configured the domains as well. Whenever it tries to generate the certificates it logs the following messages and usually crashes right after.

verb Certs ACME precheck passed. action=precheck domain=mail.xxxx.xx
info Gelf {"short_message":"WILDDUCK Autogenerating TLS certificate for mail.xxxx.xx","_sni_servername":"mail.xxxx.xx","_cert_action":"sni_autogenerate","facility":"wildduck","host":"wildduck-55c595f8bf-mf657","timestamp":1717765634.62,"_component":"wildduck"}
info Gelf {"short_message":"WILDDUCK SNI cert updated for mail.xxxx.xx","_sni_servername":"mail.xxxx.xx","_cert_action":"update","facility":"wildduck","host":"wildduck-55c595f8bf-mf657","timestamp":1717765634.634,"_component":"wildduck"}
info ACME Domain validation for mail.xxxx.xx passed

My ACME config is:

# ACME production settings
key = "production"
directoryUrl = "https://acme-v02.api.letsencrypt.org/directory"
email = "acme@xxxx.xx"

caaDomains = [ "letsencrypt.org" ]

keyBits = 2048
keyExponent = 65537

[autogenerate]
enabled = true

[autogenerate.cnameMapping]
"mail" = ["mx01.xxxx.xx"]

I am running the wildduck-dockerized and the API is running on port 80 and the https://mail.xxxx.xx is accessible with a self signed cert.

bramhoven commented 4 months ago

I managed to fix the issue. What happened was that the Traefik reverse proxy that is in front of my Wildduck api server redirected all the http traffic to https (with a certificate that was self signed by Traefik). I now managed to remove the redirection and added an ssl passthrough. Now the certificates are successfully issued!