Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatPolicy ¶
FormatPolicy https://www.mailhardener.com/kb/mta-sts TODO: use text/template for this stuff?
func HTTPHandler ¶
func HTTPHandler(p *Policy) (http.HandlerFunc, error)
HTTPHandler returns a handler serving p's policy document. p is a pointer, not a snapshot: the policy is rendered fresh on every request, so mutations made to *p after HTTPHandler returns (e.g. rotating MX hosts) are reflected on the next request.
Types ¶
type Config ¶
type Config struct {
Mode Mode `mapstructure:"mode"`
MX []string `mapstructure:"mx"`
MaxAge uint32 `mapstructure:"max-age"`
}
Config represents MTA-STS configuration used to create a policy.
type Record ¶
Record represents an MTA-STS DNS TXT record.
func (*Record) RecordPrefix ¶
func (*Record) RecordType ¶
func (*Record) RecordValue ¶
Click to show internal directories.
Click to hide internal directories.