Documentation
¶
Index ¶
Constants ¶
const ( None = Result("NONE") Neutral = Result("NEUTRAL") Pass = Result("PASS") Fail = Result("FAIL") Softfail = Result("SOFTFAIL") TempError = Result("TEMPERROR") PermError = Result("PERMERROR") )
SPF results
Variables ¶
var DNSServer = "8.8.8.8:53"
DNSServer global var to use for resolver in format <ip>:<port> By default it uses Google's 8.8.8.8:53 Misconfigured DNSServer will cause SPF checks to return TEMPERROR.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result string
Result of SPF check
func CheckHost ¶
CheckHost for SPF rules. ip - the IP address of the SMTP client that is emitting the mail, either IPv4 or IPv6. domain - the domain that provides the sought-after authorization information; initially, the domain portion of the "MAIL FROM" or "HELO" identity. sender - the "MAIL FROM" or "HELO" identity. helo - domain from helo, used as sender domain if sender is not specified.
func LookupSPF ¶
LookupSPF returns spf txt record. if no records found or more than one record found, r value will be set accordingly to None or PermError. If dns lookup faild, r will be set to TempError.