dmarc

package
v0.55.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlignmentPolicy

type AlignmentPolicy string

AlignmentPolicy represents a DMARC alignment policy (strict, relaxed).

const (
	AlignmentPolicyStrict  AlignmentPolicy = "s"
	AlignmentPolicyRelaxed AlignmentPolicy = "r"
)

type Policy

type Policy string

Policy represents a DMARC policy (none, quarantine, reject).

const (
	PolicyNone       Policy = "none"
	PolicyQuarantine Policy = "quarantine"
	PolicyReject     Policy = "reject"
)

type Record

type Record struct {
	Version             string          `mapstructure:"version"`
	Policy              Policy          `mapstructure:"policy"`
	Percent             *uint8          `mapstructure:"percent"`
	ReportURIAggregate  []string        `mapstructure:"report-uri-aggregate"`
	ReportURIFailure    []string        `mapstructure:"report-uri-failure"`
	SubdomainPolicy     Policy          `mapstructure:"subdomain-policy"`
	AlignmentPolicyDKIM AlignmentPolicy `mapstructure:"alignment-policy-dkim"`
	AlignmentPolicySPF  AlignmentPolicy `mapstructure:"alignment-policy-spf"`
}

Record represents a DMARC DNS record.

func (*Record) RecordPrefix

func (r *Record) RecordPrefix() string

func (*Record) RecordType

func (r *Record) RecordType() string

func (*Record) RecordValue

func (r *Record) RecordValue() string

func (*Record) Render

func (r *Record) Render(data any) error

func (*Record) SetPercent

func (r *Record) SetPercent(pct uint8) error

func (*Record) String

func (r *Record) String() string

func (*Record) UnsetPercent

func (r *Record) UnsetPercent()

Jump to

Keyboard shortcuts

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