spf

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSPFRecord = errors.New("no SPF record found")

Functions

This section is empty.

Types

type Mechanism

type Mechanism struct {
	Qualifier Result
	Type      string
	Value     string
}

Mechanism represents a single SPF mechanism (e.g., "a", "mx", "ip4:...")

type Resolver

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

func NewResolver

func NewResolver() *Resolver

func (*Resolver) LookupA

func (r *Resolver) LookupA(domain string) ([]net.IP, error)

func (*Resolver) LookupMX

func (r *Resolver) LookupMX(domain string) ([]string, error)

func (*Resolver) LookupPTR

func (r *Resolver) LookupPTR(ip net.IP) ([]string, error)

func (*Resolver) LookupSPF

func (r *Resolver) LookupSPF(domain string) (string, error)

type Result

type Result string
const (
	ResultNone      Result = "none"
	ResultNeutral   Result = "neutral"
	ResultPass      Result = "pass"
	ResultFail      Result = "fail"
	ResultSoftFail  Result = "softfail"
	ResultTempError Result = "temperror"
	ResultPermError Result = "permerror"
)

type Validator

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

func NewValidator

func NewValidator(resolver *Resolver) *Validator

func (*Validator) Check

func (v *Validator) Check(ip net.IP, domain, sender string) (Result, error)

Jump to

Keyboard shortcuts

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