diff options
| -rw-r--r-- | lib/spf/directive.go | 2 | ||||
| -rw-r--r-- | lib/spf/macro.go | 14 | ||||
| -rw-r--r-- | lib/spf/result.go | 9 |
3 files changed, 16 insertions, 9 deletions
diff --git a/lib/spf/directive.go b/lib/spf/directive.go index 417384f1..45a0c66a 100644 --- a/lib/spf/directive.go +++ b/lib/spf/directive.go @@ -25,7 +25,7 @@ const ( ) type directive struct { - qual byte mech string value []byte + qual byte } diff --git a/lib/spf/macro.go b/lib/spf/macro.go index f41f2e32..825be51a 100644 --- a/lib/spf/macro.go +++ b/lib/spf/macro.go @@ -34,14 +34,18 @@ const ( type macro struct { ref *Result - out []byte // mode is either mechanism "include", modifier "redirect", or // modifier "exp". - mode string - nright int - dels []byte - letter byte + mode string + + out []byte + dels []byte + + nright int + + letter byte + isReversed bool } diff --git a/lib/spf/result.go b/lib/spf/result.go index 34f98430..48ecb1db 100644 --- a/lib/spf/result.go +++ b/lib/spf/result.go @@ -16,18 +16,21 @@ import ( // Result contains the output of CheckHost function. type Result struct { - IP net.IP // The IP address of sender. + IP net.IP // The IP address of sender. + + Err string + Domain []byte // The domain address of sender from SMTP EHLO or MAIL FROM command. Sender []byte // The email address of sender. Hostname []byte - Code byte // Result of check host. - Err string senderLocal []byte // The local part of sender. senderDomain []byte // The domain part of sender. terms []byte // terms contains raw DNS RR that have SPF record. dirs []*directive mods []*modifier + + Code byte // Result of check host. } // newResult initialize new SPF result on single domain. |
