Documentation
¶
Overview ¶
Package checks runs a domain's mail-posture checks and scores them. Each check resolves the records it needs, applies a pure parser from the records package, and returns a Result with a status, findings, and the fix to apply. A Scanner threads data discovered early (the MX hosts and their IPs) into the later checks that need it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Resolver string // pinned nameserver, or "" for the system resolver
Selector string // DKIM selector override
Timeout time.Duration // per-lookup timeout
SkipNetwork bool // skip checks that open TCP connections (MX reachability, STARTTLS)
SendingIPs []string // extra IPs to reverse-check and run against blocklists
}
Options tunes a scan.
type Report ¶
type Report struct {
Domain string `json:"domain"`
Results []Result `json:"results"`
Score int `json:"score"`
Grade string `json:"grade"`
}
Report is a full scan of one domain.
type Result ¶
type Result struct {
Name string `json:"name"`
Status Status `json:"status"`
Summary string `json:"summary"`
Findings []string `json:"findings,omitempty"`
Fixes []string `json:"fixes,omitempty"`
// contains filtered or unexported fields
}
Result is one check's outcome.
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner holds a scan's shared state: the resolver and the MX data the MX check discovers for the reachability, PTR, STARTTLS, and DANE checks to reuse.
type Status ¶
type Status int
Status is the outcome of a single check.
const ( // Pass: configured well. Pass Status = iota // Warn: works but weak (for example DMARC p=none). Warn // Fail: missing or broken, and it affects deliverability. Fail // NA: legitimately not applicable (for example BIMI, or no MX on a // non-sending domain). Never penalized. NA // Skip: could not test from this machine (for example port 25 blocked). // Never penalized, since it reflects the runner, not the domain. Skip )
Click to show internal directories.
Click to hide internal directories.