mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 10:34: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:
@ -1,6 +1,7 @@
|
||||
package dmarcrpt
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
@ -62,6 +63,7 @@ const reportExample = `<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
func TestParseReport(t *testing.T) {
|
||||
var expect = &Feedback{
|
||||
XMLName: xml.Name{Local: "feedback"},
|
||||
ReportMetadata: ReportMetadata{
|
||||
OrgName: "google.com",
|
||||
Email: "noreply-dmarc-support@google.com",
|
||||
@ -126,7 +128,7 @@ func TestParseMessageReport(t *testing.T) {
|
||||
dir := filepath.FromSlash("../testdata/dmarc-reports")
|
||||
files, err := os.ReadDir(dir)
|
||||
if err != nil {
|
||||
t.Fatalf("listing dmarc report emails: %s", err)
|
||||
t.Fatalf("listing dmarc aggregate report emails: %s", err)
|
||||
}
|
||||
|
||||
for _, file := range files {
|
||||
|
Reference in New Issue
Block a user