mirror of
https://github.com/mjl-/mox.git
synced 2025-06-28 11:38:16 +03:00
in domain/dns self-check, provide config snippet for HostTLSRPT if it isn't configured and the admin should check again for the DNS records
feedback from mteege, thanks!
This commit is contained in:
parent
1d6f45e592
commit
6f678125a5
@ -1205,7 +1205,7 @@ EOF
|
|||||||
|
|
||||||
record, txt, err := tlsrpt.Lookup(ctx, log.Logger, resolver, dom)
|
record, txt, err := tlsrpt.Lookup(ctx, log.Logger, resolver, dom)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
addf(&result.Errors, "Looking up TLSRPT record: %s", err)
|
addf(&result.Errors, "Looking up TLSRPT record for domain %s: %s", dom, err)
|
||||||
}
|
}
|
||||||
result.TXT = txt
|
result.TXT = txt
|
||||||
if record != nil {
|
if record != nil {
|
||||||
@ -1251,9 +1251,19 @@ Ensure a DNS TXT record like the following exists:
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if isHost {
|
} else if isHost {
|
||||||
addf(&result.Errors, `Configure a host TLSRPT localpart in static mox.conf config file.`)
|
instr += fmt.Sprintf(`
|
||||||
|
|
||||||
|
Ensure the following snippet is present in mox.conf (ensure tabs are used for indenting, not spaces):
|
||||||
|
|
||||||
|
HostTLSRPT:
|
||||||
|
Account: %s
|
||||||
|
Mailbox: TLSRPT
|
||||||
|
Localpart: tlsrpt
|
||||||
|
|
||||||
|
`, mox.Conf.Static.Postmaster.Account)
|
||||||
|
addf(&result.Errors, `Configure a HostTLSRPT section in the static mox.conf config file, restart mox and check again for instructions for the TLSRPT DNS record.`)
|
||||||
} else {
|
} else {
|
||||||
addf(&result.Errors, `Configure a domain TLSRPT destination in domains.conf config file.`)
|
addf(&result.Errors, `Configure a TLSRPT destination for the domain (through the admin web interface or by editing the domains.conf config file, adding a TLSRPT section) and check again for instructions for the TLSRPT DNS record.`)
|
||||||
}
|
}
|
||||||
addf(&result.Instructions, instr)
|
addf(&result.Instructions, instr)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user