spf

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpfRecord

type SpfRecord struct {
	QueryDomain string   `desc:"Domain"`
	Version     string   `desc:"SPF record version"`
	IPs         []net.IP `desc:"List of allowed IP addresses authorised to send email on your behalf"`
	Includes    []string `desc:"List of allowed third party domains that can send email on you behalf"`
	Tag         string   `desc:"Tag (policy) applied to SPF. -all: fail, ~all: softfail, and +all: allow"`
}

func (SpfRecord) Marshal

func (s SpfRecord) Marshal(kind string) ([]byte, error)

Marshal provides a way to show a DMARC report in different formats

func (*SpfRecord) Query

func (s *SpfRecord) Query(ctx context.Context, server string) (err error)

Query function takes a top level domain name (google.com) and returns the MX TXT record associated with it. it uses the system's resolver if server is provided as 0.0.0.0 otherwise it'll explicity query from the requested server.

Jump to

Keyboard shortcuts

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