1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-19 14:57:04 +00:00
Files
go-chasquid-smtp/cmd/spf-check/spf-check.go
Alberto Bertogli 3d3b771b80 internal/spf: Add an SPF package
This patch adds a package for evaluating SPF, as defined by RFC 7208
(https://tools.ietf.org/html/rfc7208).

It doesn't implement 100% of the RFC, but it coves enough to handle the
most common cases, and will fail open on the others.
2016-10-10 00:51:05 +01:00

21 lines
347 B
Go

// Command line tool for playing with the SPF library.
//
// Not for use in production, just development and experimentation.
package main
import (
"flag"
"fmt"
"net"
"blitiri.com.ar/go/chasquid/internal/spf"
)
func main() {
flag.Parse()
r, err := spf.CheckHost(net.ParseIP(flag.Arg(0)), flag.Arg(1))
fmt.Println(r)
fmt.Println(err)
}