mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 07:14:40 +03:00
add suppression list for outgoing dmarc and tls reports
for reporting addresses that cause DSNs to be returned. that just adds noise. the admin can add/remove/extend addresses through the webadmin. in the future, we could send reports with a smtp mail from of "postmaster+<signed-encoded-recipient>@...", and add the reporting recipient on the suppression list automatically when a DSN comes in on that address, but for now this will probably do.
This commit is contained in:
@ -381,4 +381,14 @@ func TestSendReports(t *testing.T) {
|
||||
"tls-reports3@mailhost.sender.example": report2,
|
||||
}
|
||||
test(tlsResults, expReports)
|
||||
|
||||
db.Insert(ctxbg,
|
||||
&tlsrptdb.TLSRPTSuppressAddress{ReportingAddress: "tls-reports@sender.example", Until: time.Now().Add(-time.Minute)}, // Expired, so ignored.
|
||||
&tlsrptdb.TLSRPTSuppressAddress{ReportingAddress: "tls-reports1@mailhost.sender.example", Until: time.Now().Add(time.Minute)}, // Still valid.
|
||||
&tlsrptdb.TLSRPTSuppressAddress{ReportingAddress: "tls-reports3@mailhost.sender.example", Until: time.Now().Add(31 * 24 * time.Hour)}, // Still valid.
|
||||
)
|
||||
test(tlsResults, map[string]tlsrpt.Report{
|
||||
"tls-reports@sender.example": report1,
|
||||
"tls-reports2@mailhost.sender.example": report2,
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user