mirror of
https://github.com/mjl-/mox.git
synced 2025-01-13 16:58:49 +03:00
allow requesting a certificate for autodiscover.<domain>, but don't recommend a DNS record that would make requests to it.
this may help testing again in the future. autodiscover with outlook is not working now.
This commit is contained in:
parent
c21b8c0d54
commit
ae60cdac7e
2 changed files with 13 additions and 4 deletions
|
@ -150,6 +150,10 @@ func autoconfHandle(l config.Listener) http.HandlerFunc {
|
||||||
|
|
||||||
// Autodiscover from Microsoft, also used by Thunderbird.
|
// Autodiscover from Microsoft, also used by Thunderbird.
|
||||||
// User should create a DNS record: _autodiscover._tcp.<domain> IN SRV 0 0 443 <hostname or autodiscover.<domain>>
|
// User should create a DNS record: _autodiscover._tcp.<domain> IN SRV 0 0 443 <hostname or autodiscover.<domain>>
|
||||||
|
// In practice, autodiscover does not seem to work (any more). A connectivity test
|
||||||
|
// tool for outlook is available on https://testconnectivity.microsoft.com/, it has
|
||||||
|
// an option to do "Autodiscover to detect server settings". Incoming TLS
|
||||||
|
// connections are all failing, with various errors.
|
||||||
func autodiscoverHandle(l config.Listener) http.HandlerFunc {
|
func autodiscoverHandle(l config.Listener) http.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
log := xlog.WithContext(r.Context())
|
log := xlog.WithContext(r.Context())
|
||||||
|
|
|
@ -193,12 +193,17 @@ func (c *Config) allowACMEHosts() {
|
||||||
for _, dom := range c.Dynamic.Domains {
|
for _, dom := range c.Dynamic.Domains {
|
||||||
|
|
||||||
if l.AutoconfigHTTPS.Enabled {
|
if l.AutoconfigHTTPS.Enabled {
|
||||||
d, err := dns.ParseDomain("autoconfig." + dom.Domain.ASCII)
|
if d, err := dns.ParseDomain("autoconfig." + dom.Domain.ASCII); err != nil {
|
||||||
if err != nil {
|
|
||||||
xlog.Errorx("parsing autoconfig domain", err, mlog.Field("domain", dom.Domain))
|
xlog.Errorx("parsing autoconfig domain", err, mlog.Field("domain", dom.Domain))
|
||||||
continue
|
} else {
|
||||||
|
m.AllowHostname(d)
|
||||||
|
}
|
||||||
|
|
||||||
|
if d, err := dns.ParseDomain("autodiscover." + dom.Domain.ASCII); err != nil {
|
||||||
|
xlog.Errorx("parsing autodiscover domain", err, mlog.Field("domain", dom.Domain))
|
||||||
|
} else {
|
||||||
|
m.AllowHostname(d)
|
||||||
}
|
}
|
||||||
m.AllowHostname(d)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if l.MTASTSHTTPS.Enabled && dom.MTASTS != nil {
|
if l.MTASTSHTTPS.Enabled && dom.MTASTS != nil {
|
||||||
|
|
Loading…
Reference in a new issue