Documentation
¶
Overview ¶
Package feedback reads what the mail world reports back: delivery status notifications (bounces), abuse feedback reports (spam complaints), DMARC aggregate and TLS reports, and relay webhooks. It only parses; the engine decides what a bounce or complaint changes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoReport = errors.New("no report found")
ErrNoReport means the message carries no readable report.
Functions ¶
This section is empty.
Types ¶
type Complaint ¶
type Complaint struct {
Type string // abuse, fraud, ...
Recipient string // the complaining address, when the reporter discloses it
OriginalID string // Message-ID of the reported message
ListUnsub string // its List-Unsubscribe header, which carries lfr's token
}
Complaint is an abuse report (RFC 5965).
type DMARCRow ¶
type DMARCRow struct {
IP string `json:"ip"`
Count int `json:"count"`
DKIM string `json:"dkim"`
SPF string `json:"spf"`
Disposition string `json:"disposition"`
}
DMARCRow is one source in a DMARC aggregate report.
type Event ¶
type Event struct {
Kind string `json:"kind"` // bounce, complaint, unsubscribe
Email string `json:"email"`
Hard bool `json:"hard"`
Note string `json:"note,omitempty"`
Source string `json:"source,omitempty"` // the envelope sender of the original message, when the relay reports it
}
Event is a bounce, complaint or unsubscribe reported by a relay webhook.
type Recipient ¶
type Recipient struct {
Email string `json:"email"`
Action string `json:"action"` // failed, delayed, delivered, relayed, expanded
Status string `json:"status"` // e.g. 5.1.1
Diagnostic string `json:"diagnostic,omitempty"`
}
Recipient is one recipient's outcome in a bounce.
type Report ¶
type Report struct {
Kind string `json:"kind"` // dmarc, tlsrpt
Org string `json:"org"`
ID string `json:"report_id"`
Domain string `json:"domain"`
Begin time.Time `json:"begin"`
End time.Time `json:"end"`
Pass int `json:"pass"`
Fail int `json:"fail"`
Rows json.RawMessage `json:"rows"`
}
Report is a summarized aggregate report.
type SNSVerifier ¶
SNSVerifier checks SNS message signatures against Amazon's signing certificates, as AWS documents for HTTPS subscribers.