From f2fd6241a02d3f5c80c9a4832948d8cc331194dd Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Wed, 22 Feb 2023 23:22:42 +0100 Subject: [PATCH] do not bind to port 443 for tls-alpn01 if there is no ACME configured for #2 --- http/web.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/web.go b/http/web.go index bfb8b7f..567c187 100644 --- a/http/web.go +++ b/http/web.go @@ -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 {