mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 07:14:40 +03:00
implement outgoing dmarc aggregate reporting
in smtpserver, we store dmarc evaluations (under the right conditions). in dmarcdb, we periodically (hourly) send dmarc reports if there are evaluations. for failed deliveries, we deliver the dsn quietly to a submailbox of the postmaster mailbox. this is on by default, but can be disabled in mox.conf.
This commit is contained in:
8
main.go
8
main.go
@ -2436,13 +2436,13 @@ address must opt-in to receiving DMARC reports by creating a DMARC record at
|
||||
return
|
||||
}
|
||||
|
||||
accepts, status, _, txt, authentic, err := dmarc.LookupExternalReportsAccepted(context.Background(), dns.StrictResolver{}, domain, destdom)
|
||||
accepts, status, _, txts, authentic, err := dmarc.LookupExternalReportsAccepted(context.Background(), dns.StrictResolver{}, domain, destdom)
|
||||
var txtstr string
|
||||
txtaddr := fmt.Sprintf("%s._report._dmarc.%s", domain.ASCII, destdom.ASCII)
|
||||
if txt == "" {
|
||||
txtstr = fmt.Sprintf(" (no txt record %s)", txtaddr)
|
||||
if len(txts) == 0 {
|
||||
txtstr = fmt.Sprintf(" (no txt records %s)", txtaddr)
|
||||
} else {
|
||||
txtstr = fmt.Sprintf(" (txt record %s: %q)", txtaddr, txt)
|
||||
txtstr = fmt.Sprintf(" (txt record %s: %q)", txtaddr, txts)
|
||||
}
|
||||
if status != dmarc.StatusNone {
|
||||
printResult("fail: %s%s", err, txtstr)
|
||||
|
Reference in New Issue
Block a user