Asggo Spf Save

Parse SPF record and determine if client IP is allowed to send email.

Project README

Package spf

Documentation

Package spf parses an SPF record and determines if a given IP address is allowed to send email based on that record. SPF handles all of the mechanisms defined at http://www.open-spf.org/SPF_Record_Syntax/.

Example

package main

import "github.com/asggo/spf"

func main() {

        SMTPClientIP := "1.1.1.1"
        envelopeFrom := "[email protected]"

        result, err := spf.SPFTest(SMTPClientIP, envelopeFrom)
        if err != nil {
                panic(err)
        }

        switch result {
        case spf.Pass:
                // allow action
        case spf.Fail:
                // deny action
        }
	//...
}

Open Source Agenda is not affiliated with "Asggo Spf" Project. README Source: asggo/spf
Stars
29
Open Issues
2
Last Commit
3 years ago
Repository

Open Source Agenda Badge

Open Source Agenda Rating