mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-19 14:57:04 +00:00
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.
21 lines
347 B
Go
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)
|
|
}
|