do not bind to port 443 for tls-alpn01 if there is no ACME configured

for #2
This commit is contained in:
Mechiel Lukkien 2023-02-22 23:22:42 +01:00
parent 54981fbc93
commit f2fd6241a0
No known key found for this signature in database

View file

@ -67,8 +67,8 @@ func ListenAndServe() {
return s
}
if l.SMTP.Enabled && !l.SMTP.NoSTARTTLS || l.Submissions.Enabled || l.IMAPS.Enabled {
ensureServe(true, config.Port(config.Port(l.AutoconfigHTTPS.Port, 443), 443), "acme-tls-alpn01")
if l.TLS != nil && l.TLS.ACME != "" && (l.SMTP.Enabled && !l.SMTP.NoSTARTTLS || l.Submissions.Enabled || l.IMAPS.Enabled) {
ensureServe(true, config.Port(mox.Conf.Static.ACME[l.TLS.ACME].Port, 443), "acme-tls-alpn01")
}
if l.AccountHTTP.Enabled {