dmarc

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDMARCRecord = errors.New("no DMARC record found")

Functions

This section is empty.

Types

type EnforcementResult

type EnforcementResult struct {
	Policy      string
	Action      string
	SPFResult   spf.Result
	DKIMResult  bool
	SPFAligned  bool
	DKIMAligned bool
	Reason      string
}

type Enforcer

type Enforcer struct {
	// contains filtered or unexported fields
}

func NewEnforcer

func NewEnforcer(resolver *Resolver) *Enforcer

func (*Enforcer) Enforce

func (e *Enforcer) Enforce(msg *Message) (*EnforcementResult, error)

type Message

type Message struct {
	From       string
	SPFResult  spf.Result
	DKIMValid  bool
	DKIMDomain string
}

Message is a placeholder for the email message structure

type Policy

type Policy struct {
	Version          string
	Policy           string // none, quarantine, reject
	SubdomainPolicy  string
	Percentage       int
	DKIM             string // r (relaxed) or s (strict)
	SPF              string // r (relaxed) or s (strict)
	ReportAggregate  string
	ReportForensic   string
	ReportInterval   int
	FailureReporting string
}

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func NewResolver

func NewResolver() *Resolver

func (*Resolver) LookupDMARC

func (r *Resolver) LookupDMARC(domain string) (*Policy, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL