dmarc

package module
v0.0.0-...-5be0047 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2019 License: MIT Imports: 6 Imported by: 0

README

go-dmarc

GoDoc

A DMARC library for Go.

Note: this repository has been migrated to https://github.com/emersion/go-msgauth

License

MIT

Documentation

Overview

Package dmarc implements DMARC as specified in RFC 7489.

Index

Constants

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

Variables

This section is empty.

Functions

func IsTempFail

func IsTempFail(err error) bool

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 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

func Lookup(domain string) (*Record, error)

Lookup queries a DMARC record for a specified domain.

type ReportFormat

type ReportFormat string
const (
	ReportFormatAFRF ReportFormat = "afrf"
)

Jump to

Keyboard shortcuts

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