spf

package
v0.0.0-...-1ec07ed Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2015 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 SPF

type SPF struct {
	ValidIPRanges []string //Contains a list of valid CIDR ranges, as defined in the SPF record
	Domain        string   //The domain we're checking SPF for
	EmailAddress  string   //The email address we're pretending to send as
	IPAddress     string   //The IP address we're pretending to send from
	IsValid       bool     //Will be true if IPAddress is found in ValidIPRanges
	FoundCIDR     string   //The actual CIDR range our IP is found in
	// contains filtered or unexported fields
}

SPF wraps all of our information into a nice little struct

func New

func New(emailAddress string, sourceIPAddress string) *SPF

New returns an SPF struct, given an email address and a source IP.

func (*SPF) AllRecord

func (spf *SPF) AllRecord() string

AllRecord returns a string containing "SoftFail", "Fail", or "None".

func (*SPF) Process

func (spf *SPF) Process()

Process is where all the magic happens. It is called when we create a new SPF object. It can also be called again if you change the email address or source IP address.

Jump to

Keyboard shortcuts

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