go-msgauth

A Go library to create and parse Authentication-Results header fields.
Usage
// Format
results := []msgauth.Result{
&msgauth.SPFResult{Value: msgauth.ResultPass, From: "example.net"},
&msgauth.AuthResult{Value: msgauth.ResultPass, Auth: "sender@example.com"},
}
s := msgauth.Format("example.com", results)
log.Println(s)
// Parse
identifier, results, err := msgauth.Parse(s)
if err != nil {
log.Fatal(err)
}
log.Println(identifier, results)
License
MIT