at startup, with acme, if the config has explicitly configured public ips (the default with the quickstart), lookup the host names allowed for acme validation and warn about ips that mox is not configured to listen on

i've seen this cause acme validation failures 3 times now, so give a hint in
the logs to new users. also for issue #13.
This commit is contained in:
Mechiel Lukkien
2023-03-05 16:22:23 +01:00
parent 845a72d07a
commit dedc90f455
5 changed files with 51 additions and 13 deletions

View File

@ -227,12 +227,6 @@ func (c *Config) allowACMEHosts() {
} else {
hostnames[d] = struct{}{}
}
if d, err := dns.ParseDomain("autodiscover." + dom.Domain.ASCII); err != nil {
xlog.Errorx("parsing autodiscover domain", err, mlog.Field("domain", dom.Domain))
} else {
hostnames[d] = struct{}{}
}
}
if l.MTASTSHTTPS.Enabled && dom.MTASTS != nil && !l.MTASTSHTTPS.NonTLS {
@ -254,7 +248,7 @@ func (c *Config) allowACMEHosts() {
}
}
m.SetAllowedHostnames(hostnames)
m.SetAllowedHostnames(dns.StrictResolver{Pkg: "autotls"}, hostnames, c.Static.Listeners["public"].IPs)
}
}