Documentation
¶
Overview ¶
Package authres parses and formats Authentication-Results
Authentication-Results header fields are standardized in RFC 7601.
Example ¶
package main
import (
"log"
"github.com/emersion/go-msgauth/authres"
)
func main() {
// Format
results := []authres.Result{
&authres.SPFResult{Value: authres.ResultPass, From: "example.net"},
&authres.AuthResult{Value: authres.ResultPass, Auth: "sender@example.com"},
}
s := authres.Format("example.com", results)
log.Println(s)
// Parse
identifier, results, err := authres.Parse(s)
if err != nil {
log.Fatal(err)
}
log.Println(identifier, results)
}
Output:
Index ¶
Examples ¶
Constants ¶
View Source
const ( ResultNone ResultValue = "none" ResultPass = "pass" ResultFail = "fail" ResultPolicy = "policy" ResultNeutral = "neutral" ResultTempError = "temperror" ResultPermError = "permerror" ResultHardFail = "hardfail" ResultSoftFail = "softfail" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ARCResult ¶
type ARCResult struct {
Value ResultValue
RemoteIP string
OldestPass int
}
type AuthResult ¶
type AuthResult struct {
Value ResultValue
Reason string
Auth string
}
type DKIMResult ¶
type DMARCResult ¶
type DMARCResult struct {
Value ResultValue
Reason string
From string
}
type DomainKeysResult ¶
type DomainKeysResult struct {
Value ResultValue
Reason string
Domain string
From string
Sender string
}
type GenericResult ¶
type GenericResult struct {
Method string
Value ResultValue
Params map[string]string
}
type IPRevResult ¶
type IPRevResult struct {
Value ResultValue
Reason string
IP string
}
type Result ¶
type Result interface {
// contains filtered or unexported methods
}
Result is an authentication result.
type ResultValue ¶
type ResultValue string
ResultValue is an authentication result value, as defined in RFC 5451 section 6.3.
type SenderIDResult ¶
type SenderIDResult struct {
Value ResultValue
Reason string
HeaderKey string
HeaderValue string
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package dkim creates and verifies DKIM signatures, as specified in RFC 6376.
|
Package dkim creates and verifies DKIM signatures, as specified in RFC 6376. |
|
Package dmarc implements DMARC as specified in RFC 7489.
|
Package dmarc implements DMARC as specified in RFC 7489. |
Click to show internal directories.
Click to hide internal directories.