You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2006/07/12 18:19:04 UTC

[Bug 4981] New: urirhssub only supports A records and bitmasks, docs suggest it should support more

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981

           Summary: urirhssub only supports A records and bitmasks, docs
                    suggest it should support more
           Product: Spamassassin
           Version: 3.1.3
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Plugins
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: nj@leverton.org


Documentation says:        
        
urirhssub NAME_OF_RULE rhsbl_zone lookuptype subtest        
        
 Specify a RHSBL-style domain lookup with a sub-test.  "NAME_OF_RULE" is the        
 name of the rule to be used, "rhsbl_zone" is the zone to look up domain names        
 in, and "lookuptype" is the type of lookup (TXT or A).        
        
 "subtest" is the sub-test to run against the returned data.  The sub-test may        
 either be an IPv4 dotted address for RHSBLs that return multiple A records, a        
 non-negative decimal number to specify a bitmask for RHSBLs that return a        
 single A record containing a bitmask of results, or (if none of the preceding        
 options seem to fit) a regular expression.        
        
 Example:        
        
    urirhssub   URIBL_RHSBL_4    rhsbl.example.org.   A    127.0.0.4        
    urirhssub   URIBL_RHSBL_8    rhsbl.example.org.   A    8        
        
However for an A record, only the bitmask form actually works.  The       
dotted-quad and regexp forms give a warning and fail to match.  The attached   
test email and test cf-file 'A' should show this.   Note you need to remove   
the standard 25_uribl.cf rulefile because it also uses the multi.surbl.org   
zone.  The source of the warning is the following line in Plugin/URIDNSBL.pm 
but I am not sure if that is the whole problem: 
   
    uridnsbl_subs_bits |= $_ for keys %{$uridnsbl_subs};   
      
For a TXT record, the results are confusing.  I wouldn't expect the mask form   
or dotted-quad form to work, but the regexp form doesn't work either.  The 
test email and the test cf-file 'TXT' will show them.  DNS trace shows a TXT 
record is queried as expected, it's just not matched.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] [review] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981


sidney@sidney.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
  Status Whiteboard|can be committed            |




------- Additional Comments From sidney@sidney.com  2006-08-23 05:54 -------
Committed to 3.1 revision 433916.

Committed to trunk revision 433917.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] [review] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981





------- Additional Comments From jm@jmason.org  2006-08-21 23:13 -------
+1



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981





------- Additional Comments From nj@leverton.org  2006-07-12 16:22 -------
Created an attachment (id=3577)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3577&action=view)
rulefile for testing rhssub with A records




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981





------- Additional Comments From sidney@sidney.com  2006-08-09 04:36 -------
The patch for bug 4842 makes the warnings go away.

Does it fix the rest of this bug too?




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981





------- Additional Comments From sidney@sidney.com  2006-08-09 10:17 -------
I've tracked down what doesn't work with these tests once the patch for bug 4842
is in place:

1) The regexp can't work for either A or TXT subrules

2) The TXT record with this example returns a string
  "multi.surbl.org permanent test point"
but the rule parser in URIDNSBL.pm has no provision for specifying an arbitrary
string with spaces in it.

I think this comes down to looking at what the RBLs want to put in the records,
especially the TXT records, and decide just what functionality we want to
provide for matching them.

The code may be complex, but isn't it already in place for rule parsing?




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981





------- Additional Comments From nj@leverton.org  2006-08-11 15:40 -------
As the reporter, I can certainly live without regexp tests. 
 
I fell over this problem when finding out why a third party ruleset with a 
dotted quad on the RHS didn't work, so it seems other people are using dotted 
quads. 



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981





------- Additional Comments From jm@jmason.org  2006-08-09 09:27 -------
I'd prefer to just remove the regexp test ability entirely, if possible.  if it
doesn't work, that's hardly a regression ;), and supporting regexp-testing
requires hairy code.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981





------- Additional Comments From nj@leverton.org  2006-07-12 16:22 -------
Created an attachment (id=3578)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3578&action=view)
rulefile for testing rhssub with TXT records




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981





------- Additional Comments From sidney@sidney.com  2006-08-20 22:29 -------
Created an attachment (id=3659)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3659&action=view)
Patch to remove regexp from POD text, remove regexp case in code, and cause
lint error if subtest is not a dotted quad or a  32 bit int number

Suggested patch to code and POD against 3.1 branch that removes regexp as an
option and enforces in lint that subtest is either a number IP address (in
dotted quad syntax) or else is a decimal integer to be used as a bit mask.

Please check my regexp for correctness and especially for perl style.

review for 3.1. If it's ok I'll also check it in to trunk.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981


felicity@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |3.1.5






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981





------- Additional Comments From nj@leverton.org  2006-07-12 16:21 -------
Created an attachment (id=3576)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3576&action=view)
Test mail




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] [review] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981


sidney@sidney.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|urirhssub only supports A   |[review] urirhssub only
                   |records and bitmasks, docs  |supports A records and
                   |suggest it should support   |bitmasks, docs suggest it
                   |more                        |should support more
  Status Whiteboard|                            |needs 2 votes






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981





------- Additional Comments From sidney@sidney.com  2006-08-09 08:44 -------
Looking over the code in URIDNSBL.pm I can see how the regexp test here will not
work.

urirhssub TEST_A_RE multi.surbl.org. A /\./

parses the regular expression field into a string with value '/\./' and then
does the match using
 if ($rdatastr =~ m/${subtest}/)

Am I misunderstanding the perl or is that not correctly dealing with the
delimiters in the subtest field?

I looked at how we do it in the main rule file, with various tests and then
calling Mail::Conf::Parser->add_test and I'm hesitant to jump in with changes to
URIDNSBL.pm.

Can someone who is familiar with the code in Conf.pm and Parse.pm jump in and
look at how it should be done here? The relevant code is in URIDNSBL.pm, where
the urirhssub rule is parsed in set_config and where the match is done in
complete_dnsbl_lookup.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] [review] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981


spamassassin@dostech.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|needs 1                     |can be committed




------- Additional Comments From spamassassin@dostech.ca  2006-08-23 04:33 -------
+1



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981





------- Additional Comments From nj@leverton.org  2006-07-12 16:30 -------
Please separate my three tests per file into six separate tests - the docs  
say the zones should be identical and in those files they aren't.  For me, the  
warnings and the failure to match still happen when I run each test  
separately.  



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] [review] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|needs 2 votes               |needs 1






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4981] urirhssub only supports A records and bitmasks, docs suggest it should support more

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4981





------- Additional Comments From nj@leverton.org  2006-07-12 16:24 -------
Created an attachment (id=3579)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3579&action=view)
test results from the A record case.

25_uribl.cf deliberately made unreadable, as it uses the same zones as the test
case.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.