emailauth

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckResult

type CheckResult struct {
	Status CheckStatus `json:"status"`
	Detail string      `json:"detail,omitempty"`
}

CheckResult holds the outcome of a single authentication check.

type CheckStatus

type CheckStatus string

CheckStatus represents the result of an authentication check.

const (
	StatusPass      CheckStatus = "pass"
	StatusFail      CheckStatus = "fail"
	StatusNone      CheckStatus = "none"
	StatusTempError CheckStatus = "temperror"
	StatusPermError CheckStatus = "permerror"
)

type Result

type Result struct {
	SPF  CheckResult `json:"spf"`
	DKIM CheckResult `json:"dkim"`
}

Result aggregates SPF and DKIM check results.

func Check

func Check(remoteIP net.IP, senderEmail string, rawMessage []byte) *Result

Check runs SPF and DKIM verification on an inbound message. remoteIP is the IP address of the SMTP client that connected to us. senderEmail is the envelope sender (MAIL FROM). rawMessage is the full RFC 2822 message including headers.

func (*Result) DomainAuthenticated

func (r *Result) DomainAuthenticated() bool

DomainAuthenticated returns true if at least one domain-level check passed.

func (*Result) Summary

func (r *Result) Summary() string

Summary returns a short string describing the results, suitable for an auth header.

Jump to

Keyboard shortcuts

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