spf

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	DomainAlignment DomainAlignmentCheck
}

func (*Client) GetStatus

func (c *Client) GetStatus(remoteIP net.IP, helo, fromHeader string) (Status, error)

func (*Client) ValidateAlignment

func (c *Client) ValidateAlignment(from, fromHeader string) (bool, error)

type DomainAlignmentCheck

type DomainAlignmentCheck interface {
	ValidateDomainAlignment(a, b string) error
}

type Status

type Status int

Status is a description of the DKIM status

 ENUM(
	none
	fail
	pass
	unknown

)

const (
	// StatusNone is a Status of type None
	StatusNone Status = iota
	// StatusFail is a Status of type Fail
	StatusFail
	// StatusPass is a Status of type Pass
	StatusPass
	// StatusUnknown is a Status of type Unknown
	StatusUnknown
)

func ParseStatus

func ParseStatus(name string) (Status, error)

ParseStatus attempts to convert a string to a Status

func (Status) MarshalText

func (x Status) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method

func (Status) String

func (x Status) String() string

String implements the Stringer interface.

func (*Status) UnmarshalText

func (x *Status) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method

Jump to

Keyboard shortcuts

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