mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 13:04:38 +03:00
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:
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user