From 6f678125a56d08045abb4863fd46b3a8a9da779d Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Sun, 16 Feb 2025 16:12:44 +0100 Subject: [PATCH] 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! --- webadmin/admin.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/webadmin/admin.go b/webadmin/admin.go index 3826047..eb8adc4 100644 --- a/webadmin/admin.go +++ b/webadmin/admin.go @@ -1205,7 +1205,7 @@ EOF record, txt, err := tlsrpt.Lookup(ctx, log.Logger, resolver, dom) 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 if record != nil { @@ -1251,9 +1251,19 @@ Ensure a DNS TXT record like the following exists: } } 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 { - 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) }