You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Robert Burrell Donkin (JIRA)" <se...@james.apache.org> on 2009/05/29 08:14:45 UTC

[jira] Created: (JSPF-72) Parsing errors for TXT records

Parsing errors for TXT records
------------------------------

                 Key: JSPF-72
                 URL: https://issues.apache.org/jira/browse/JSPF-72
             Project: JAMES jSPF
          Issue Type: Bug
          Components: Parser
    Affects Versions: 0.9.6, 0.9.7
            Reporter: Robert Burrell Donkin
             Fix For: 0.9.7


We are getting parsing errors from jSPF for TXT records like:

$ host -t txt about.com
;; Truncated, retrying in TCP mode.
about.com descriptive text "v=spf1 ip4:207.241.148.60 ip4:207.241.148.40 
ip4:207.241.148.227 ip4:207.241.145.5 ip4:207.241.145.6 
ip4:207.241.149.197 ip4:207.241.148.39 ip4:207.241.148.226 
ip4:207.241.148.227 ip4:207.241.148.64 ip4:207.241.148.228" " 
a:mclist.about.com a:ablist.about.com a:smtp.about.com a:mxc1s.about.com 
a:smtpapps.about.com a:listserv1.about.com a:listserv2.about.com 
a:mail.about.com a:om1.about.com -all"

The error jSPF reports when checking messages with that domain is:

Term [ip4:207.241.148.228"] is not syntactically valid: ...<monster 
regex follows>

...the SPF TXT record is valid, to my knowledge. So it seems like a 
parsing error that can't handle TXT records with multiple quoted terms 
on the line?

It has been suggested that there may be firewall issues since the DNS 
falls back to TCP. I don't think that's happening, but either way... a 
bug, no?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Resolved: (JSPF-72) Parsing errors for TXT records

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/JSPF-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefano Bagnara resolved JSPF-72.
---------------------------------

    Resolution: Fixed

I found that the issue was better solved in the xbill resolver and not in the SPFRetriever.

> Parsing errors for TXT records
> ------------------------------
>
>                 Key: JSPF-72
>                 URL: https://issues.apache.org/jira/browse/JSPF-72
>             Project: JAMES jSPF
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 0.9.6, 0.9.7
>            Reporter: Robert Burrell Donkin
>            Assignee: Stefano Bagnara
>             Fix For: 0.9.7
>
>
> We are getting parsing errors from jSPF for TXT records like:
> $ host -t txt about.com
> ;; Truncated, retrying in TCP mode.
> about.com descriptive text "v=spf1 ip4:207.241.148.60 ip4:207.241.148.40 
> ip4:207.241.148.227 ip4:207.241.145.5 ip4:207.241.145.6 
> ip4:207.241.149.197 ip4:207.241.148.39 ip4:207.241.148.226 
> ip4:207.241.148.227 ip4:207.241.148.64 ip4:207.241.148.228" " 
> a:mclist.about.com a:ablist.about.com a:smtp.about.com a:mxc1s.about.com 
> a:smtpapps.about.com a:listserv1.about.com a:listserv2.about.com 
> a:mail.about.com a:om1.about.com -all"
> The error jSPF reports when checking messages with that domain is:
> Term [ip4:207.241.148.228"] is not syntactically valid: ...<monster 
> regex follows>
> ...the SPF TXT record is valid, to my knowledge. So it seems like a 
> parsing error that can't handle TXT records with multiple quoted terms 
> on the line?
> It has been suggested that there may be firewall issues since the DNS 
> falls back to TCP. I don't think that's happening, but either way... a 
> bug, no?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JSPF-72) Parsing errors for TXT records

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/JSPF-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefano Bagnara updated JSPF-72:
--------------------------------

    Priority: Critical  (was: Major)

> Parsing errors for TXT records
> ------------------------------
>
>                 Key: JSPF-72
>                 URL: https://issues.apache.org/jira/browse/JSPF-72
>             Project: JAMES jSPF
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 0.9.6, 0.9.7
>            Reporter: Robert Burrell Donkin
>            Assignee: Stefano Bagnara
>            Priority: Critical
>             Fix For: 0.9.7
>
>
> We are getting parsing errors from jSPF for TXT records like:
> $ host -t txt about.com
> ;; Truncated, retrying in TCP mode.
> about.com descriptive text "v=spf1 ip4:207.241.148.60 ip4:207.241.148.40 
> ip4:207.241.148.227 ip4:207.241.145.5 ip4:207.241.145.6 
> ip4:207.241.149.197 ip4:207.241.148.39 ip4:207.241.148.226 
> ip4:207.241.148.227 ip4:207.241.148.64 ip4:207.241.148.228" " 
> a:mclist.about.com a:ablist.about.com a:smtp.about.com a:mxc1s.about.com 
> a:smtpapps.about.com a:listserv1.about.com a:listserv2.about.com 
> a:mail.about.com a:om1.about.com -all"
> The error jSPF reports when checking messages with that domain is:
> Term [ip4:207.241.148.228"] is not syntactically valid: ...<monster 
> regex follows>
> ...the SPF TXT record is valid, to my knowledge. So it seems like a 
> parsing error that can't handle TXT records with multiple quoted terms 
> on the line?
> It has been suggested that there may be firewall issues since the DNS 
> falls back to TCP. I don't think that's happening, but either way... a 
> bug, no?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Assigned: (JSPF-72) Parsing errors for TXT records

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/JSPF-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefano Bagnara reassigned JSPF-72:
-----------------------------------

    Assignee: Stefano Bagnara

> Parsing errors for TXT records
> ------------------------------
>
>                 Key: JSPF-72
>                 URL: https://issues.apache.org/jira/browse/JSPF-72
>             Project: JAMES jSPF
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 0.9.6, 0.9.7
>            Reporter: Robert Burrell Donkin
>            Assignee: Stefano Bagnara
>             Fix For: 0.9.7
>
>
> We are getting parsing errors from jSPF for TXT records like:
> $ host -t txt about.com
> ;; Truncated, retrying in TCP mode.
> about.com descriptive text "v=spf1 ip4:207.241.148.60 ip4:207.241.148.40 
> ip4:207.241.148.227 ip4:207.241.145.5 ip4:207.241.145.6 
> ip4:207.241.149.197 ip4:207.241.148.39 ip4:207.241.148.226 
> ip4:207.241.148.227 ip4:207.241.148.64 ip4:207.241.148.228" " 
> a:mclist.about.com a:ablist.about.com a:smtp.about.com a:mxc1s.about.com 
> a:smtpapps.about.com a:listserv1.about.com a:listserv2.about.com 
> a:mail.about.com a:om1.about.com -all"
> The error jSPF reports when checking messages with that domain is:
> Term [ip4:207.241.148.228"] is not syntactically valid: ...<monster 
> regex follows>
> ...the SPF TXT record is valid, to my knowledge. So it seems like a 
> parsing error that can't handle TXT records with multiple quoted terms 
> on the line?
> It has been suggested that there may be firewall issues since the DNS 
> falls back to TCP. I don't think that's happening, but either way... a 
> bug, no?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JSPF-72) Parsing errors for TXT records

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/JSPF-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714386#action_12714386 ] 

Stefano Bagnara commented on JSPF-72:
-------------------------------------

The problematic code is in resolver/src/main/java/org/apache/james/jspf/policies/SPFRetriever.java
--------------------
131 : 	                // TODO is this correct? we remove the first and last char if the
132 : 	  	  	// result has an initial "
133 : 	  	  	// remove '"'
134 : 	  	  	if (compare.charAt(0)=='"') {
135 : 	  	  	compare = compare.toLowerCase().substring(1,
136 : 	  	  	compare.length() - 1);
137 : 	  	  	}
-----------------------
That code is missing escaping handling and multiple quoted string concatenation.

> Parsing errors for TXT records
> ------------------------------
>
>                 Key: JSPF-72
>                 URL: https://issues.apache.org/jira/browse/JSPF-72
>             Project: JAMES jSPF
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 0.9.6, 0.9.7
>            Reporter: Robert Burrell Donkin
>             Fix For: 0.9.7
>
>
> We are getting parsing errors from jSPF for TXT records like:
> $ host -t txt about.com
> ;; Truncated, retrying in TCP mode.
> about.com descriptive text "v=spf1 ip4:207.241.148.60 ip4:207.241.148.40 
> ip4:207.241.148.227 ip4:207.241.145.5 ip4:207.241.145.6 
> ip4:207.241.149.197 ip4:207.241.148.39 ip4:207.241.148.226 
> ip4:207.241.148.227 ip4:207.241.148.64 ip4:207.241.148.228" " 
> a:mclist.about.com a:ablist.about.com a:smtp.about.com a:mxc1s.about.com 
> a:smtpapps.about.com a:listserv1.about.com a:listserv2.about.com 
> a:mail.about.com a:om1.about.com -all"
> The error jSPF reports when checking messages with that domain is:
> Term [ip4:207.241.148.228"] is not syntactically valid: ...<monster 
> regex follows>
> ...the SPF TXT record is valid, to my knowledge. So it seems like a 
> parsing error that can't handle TXT records with multiple quoted terms 
> on the line?
> It has been suggested that there may be firewall issues since the DNS 
> falls back to TCP. I don't think that's happening, but either way... a 
> bug, no?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JSPF-72) Parsing errors for TXT records

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/JSPF-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714383#action_12714383 ] 

Stefano Bagnara commented on JSPF-72:
-------------------------------------

Confirmed as a bug. Here is the relevant specification we are not supporting:
--------------
3.1.3.  Multiple Strings in a Single DNS record

   As defined in [RFC1035] sections 3.3.14 and 3.3, a single text DNS
   record (either TXT or SPF RR types) can be composed of more than one
   string.  If a published record contains multiple strings, then the
   record MUST be treated as if those strings are concatenated together
   without adding spaces.  For example:

      IN TXT "v=spf1 .... first" "second string..."

   MUST be treated as equivalent to

      IN TXT "v=spf1 .... firstsecond string..."

   SPF or TXT records containing multiple strings are useful in
   constructing records that would exceed the 255-byte maximum length of
   a string within a single TXT or SPF RR record.


> Parsing errors for TXT records
> ------------------------------
>
>                 Key: JSPF-72
>                 URL: https://issues.apache.org/jira/browse/JSPF-72
>             Project: JAMES jSPF
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 0.9.6, 0.9.7
>            Reporter: Robert Burrell Donkin
>             Fix For: 0.9.7
>
>
> We are getting parsing errors from jSPF for TXT records like:
> $ host -t txt about.com
> ;; Truncated, retrying in TCP mode.
> about.com descriptive text "v=spf1 ip4:207.241.148.60 ip4:207.241.148.40 
> ip4:207.241.148.227 ip4:207.241.145.5 ip4:207.241.145.6 
> ip4:207.241.149.197 ip4:207.241.148.39 ip4:207.241.148.226 
> ip4:207.241.148.227 ip4:207.241.148.64 ip4:207.241.148.228" " 
> a:mclist.about.com a:ablist.about.com a:smtp.about.com a:mxc1s.about.com 
> a:smtpapps.about.com a:listserv1.about.com a:listserv2.about.com 
> a:mail.about.com a:om1.about.com -all"
> The error jSPF reports when checking messages with that domain is:
> Term [ip4:207.241.148.228"] is not syntactically valid: ...<monster 
> regex follows>
> ...the SPF TXT record is valid, to my knowledge. So it seems like a 
> parsing error that can't handle TXT records with multiple quoted terms 
> on the line?
> It has been suggested that there may be firewall issues since the DNS 
> falls back to TCP. I don't think that's happening, but either way... a 
> bug, no?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org