diff --git a/pkg/spflib/parse.go b/pkg/spflib/parse.go index 55a6290bb..2111c9e5a 100644 --- a/pkg/spflib/parse.go +++ b/pkg/spflib/parse.go @@ -82,7 +82,7 @@ func Parse(text string, dnsres Resolver) (*SPFRecord, error) { return nil, errors.Errorf("In included spf: %s", err) } } - } else if strings.HasPrefix(part, "exists:") { + } else if strings.HasPrefix(part, "exists:") || strings.HasPrefix(part, "ptr:") { p.IsLookup = true } else { return nil, errors.Errorf("Unsupported spf part %s", part) diff --git a/pkg/spflib/parse_test.go b/pkg/spflib/parse_test.go index 157bbdb9c..8bb02e850 100644 --- a/pkg/spflib/parse_test.go +++ b/pkg/spflib/parse_test.go @@ -21,6 +21,7 @@ func TestParse(t *testing.T) { "include:sendgrid.net", "include:spf.mtasv.net", "exists:%{i}._spf.sparkpostmail.com", + "ptr:sparkpostmail.com", "~all"}, " "), dnsres) if err != nil { t.Fatal(err)