mirror of
https://github.com/mjl-/mox.git
synced 2024-12-25 16:03:48 +03:00
also use "SRV 0 0 port ." in webadmin pages
for issue #240, thanks bwbroersma for reporting and patch
This commit is contained in:
parent
355488028d
commit
c13f1814fc
1 changed files with 5 additions and 1 deletions
|
@ -1409,7 +1409,11 @@ When enabling MTA-STS, or updating a policy, always update the policy first (thr
|
|||
r.SRVConf.SRVs = map[string][]net.SRV{}
|
||||
for _, req := range reqs {
|
||||
name := req.name + "._tcp." + domain.ASCII
|
||||
instr += fmt.Sprintf("\t%s._tcp.%-*s SRV 0 1 %d %s\n", req.name, len("_submissions")-len(req.name)+len(domain.ASCII+"."), domain.ASCII+".", req.port, req.host)
|
||||
weight := 1
|
||||
if req.host == "." {
|
||||
weight = 0
|
||||
}
|
||||
instr += fmt.Sprintf("\t%s._tcp.%-*s SRV 0 %d %d %s\n", req.name, len("_submissions")-len(req.name)+len(domain.ASCII+"."), domain.ASCII+".", weight, req.port, req.host)
|
||||
r.SRVConf.SRVs[req.name] = unptr(req.srvs)
|
||||
if err != nil {
|
||||
addf(&r.SRVConf.Errors, "Looking up SRV record %q: %s", name, err)
|
||||
|
|
Loading…
Reference in a new issue