change the autodiscover SRV record to point to the mail server hostname directly, not to a cname

srv targest shouldn't be cname's. bind was warning about it.
This commit is contained in:
Mechiel Lukkien
2023-10-13 08:51:02 +02:00
parent 850f4444d4
commit 67fe88f431
3 changed files with 7 additions and 2 deletions

View File

@ -623,6 +623,11 @@ func Listen() {
dom.ASCII = strings.TrimPrefix(dom.ASCII, "autoconfig.")
dom.Unicode = strings.TrimPrefix(dom.Unicode, "autoconfig.")
}
// Autodiscovery uses a SRV record. It shouldn't point to a CNAME. So we directly
// use the mail server's host name.
if dom == mox.Conf.Static.HostnameDomain || dom == mox.Conf.Static.Listeners["public"].HostnameDomain {
return true
}
_, ok := mox.Conf.Domain(dom)
return ok
}