mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 13:44:37 +03:00
for dmarc reporting, be more conservate with sending reports to junky senders, and format textual dmarc report period in the message text in utc as claimed
before this change, a message in the rejects folder that was read and marked as notjunk (e.g. automatically by webmail), could cause a dmarc report to be sent for another junky message from the domain. we now require positive signals to be for messages not in the rejects mailbox. the text/plain body of a dmarc report contains the period, but it was in local time while claiming to be in utc. make it utc, so we often get nicely rounded whole 24h utc days.
This commit is contained in:
@ -728,8 +728,8 @@ specified in the "rua" field of the DMARC record for your domain.
|
||||
Report domain: %s
|
||||
Submitter: %s
|
||||
Report-ID: %s
|
||||
Period: %s - %s in UTC
|
||||
`, dom, mox.Conf.Static.HostnameDomain, report.ReportMetadata.ReportID, beginTime.Format(time.DateTime), endTime.Format(time.DateTime))
|
||||
Period: %s - %s UTC
|
||||
`, dom, mox.Conf.Static.HostnameDomain, report.ReportMetadata.ReportID, beginTime.UTC().Format(time.DateTime), endTime.UTC().Format(time.DateTime))
|
||||
|
||||
// The attached file follows the naming convention from the RFC. ../rfc/7489:1812
|
||||
reportFilename := fmt.Sprintf("%s!%s!%d!%d!%s.xml.gz", mox.Conf.Static.HostnameDomain.ASCII, dom.ASCII, beginTime.Unix(), endTime.Add(-time.Second).Unix(), report.ReportMetadata.ReportID)
|
||||
|
Reference in New Issue
Block a user