Documentation
¶
Overview ¶
Package mailauth authenticates arriving mail (SPF, DKIM, DMARC with alignment) and DKIM-signs leaving mail. It only computes verdicts; what happens to a message is the spam filter's and the SMTP server's call.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RelayHeaders = signed(true)
RelayHeaders leave out the fields relays rewrite: Amazon SES replaces Message-ID and Date and asks senders not to sign them, and SES and SMTP2GO add their own Feedback-ID. A signature covering them would fail on arrival.
var SignedHeaders = signed(false)
SignedHeaders are the fields DKIM signatures cover. Fields that change what a reader sees or does are listed twice: a field listed once covers only its last instance, so a replayed message could gain a second Subject or List-Unsubscribe above it; the extra entry signs "no further instance" (oversigning). Listing an absent field still locks it.
Functions ¶
Types ¶
type DKIMResult ¶
type DKIMResult struct {
Domain string `json:"domain"`
Result string `json:"result"` // pass, fail, temperror, permerror
Error string `json:"error,omitempty"`
}
DKIMResult is one verified signature.
type Result ¶
type Result struct {
SPF string `json:"spf"` // pass, fail, softfail, neutral, none, temperror, permerror
SPFDomain string `json:"spf_domain"` // MAIL FROM domain, or HELO when empty
NullSender bool `json:"null_sender,omitempty"`
DKIM []DKIMResult `json:"dkim,omitempty"`
FromDomain string `json:"from_domain"`
DMARC string `json:"dmarc"` // pass, fail, none, temperror, permerror
DMARCPolicy string `json:"dmarc_policy"` // none, quarantine, reject; empty without a record
}
Result is the authentication verdict of one message.