package dmarc
import "github.com/emersion/go-msgauth/dmarc"
Package dmarc implements DMARC as specified in RFC 7489.
Index ¶
- Constants
- Variables
- func IsTempFail(err error) bool
- type AlignmentMode
- type FailureOptions
- type LookupOptions
- type Policy
- type Record
- func Lookup(domain string) (*Record, error)
- func LookupWithOptions(domain string, options *LookupOptions) (*Record, error)
- func Parse(txt string) (*Record, error)
- type ReportFormat
Constants ¶
const ( PolicyNone Policy = "none" PolicyQuarantine = "quarantine" PolicyReject = "reject" )
Variables ¶
Functions ¶
func IsTempFail ¶
IsTempFail returns true if the error returned by Lookup is a temporary failure.
Types ¶
type AlignmentMode ¶
type AlignmentMode string
const ( AlignmentStrict AlignmentMode = "s" AlignmentRelaxed = "r" )
type FailureOptions ¶
type FailureOptions int
const ( FailureAll FailureOptions = 1 << iota // "0" FailureAny // "1" FailureDKIM // "d" FailureSPF // "s" )
type LookupOptions ¶
LookupOptions allows to customize the default signature verification behavior LookupTXT returns the DNS TXT records for the given domain name. If nil, net.LookupTXT is used
type Policy ¶
type Policy string
type Record ¶
type Record struct { DKIMAlignment AlignmentMode // "adkim" SPFAlignment AlignmentMode // "aspf" FailureOptions FailureOptions // "fo" Policy Policy // "p" Percent *int // "pct" ReportFormat []ReportFormat // "rf" ReportInterval time.Duration // "ri" ReportURIAggregate []string // "rua" ReportURIFailure []string // "ruf" SubdomainPolicy Policy // "sp" }
Record is a DMARC record, as defined in RFC 7489 section 6.3.
func Lookup ¶
Lookup queries a DMARC record for a specified domain.
func LookupWithOptions ¶
func LookupWithOptions(domain string, options *LookupOptions) (*Record, error)
func Parse ¶
type ReportFormat ¶
type ReportFormat string
const ( ReportFormatAFRF ReportFormat = "afrf" )
Source Files ¶
- Version
- v0.6.8 (latest)
- Published
- Jan 5, 2024
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 6 days ago –
Tools for package owners.