Mailing List Archive

svn commit: r433916 - /spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm
Author: sidney
Date: Tue Aug 22 22:53:49 2006
New Revision: 433916

URL: http://svn.apache.org/viewvc?rev=433916&view=rev
Log:
bug 4981: remove broken urirhssub support for regexp subrule and make perldoc match the code

Modified:
spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm

Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm?rev=433916&r1=433915&r2=433916&view=diff
==============================================================================
--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm (original)
+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm Tue Aug 22 22:53:49 2006
@@ -76,10 +76,9 @@
in, and C<lookuptype> is the type of lookup (B<TXT> or B<A>).

C<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
+either be an IPv4 dotted address for RHSBLs that return multiple A records or 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.
+single A record containing a bitmask of results.

Note that, as with C<urirhsbl>, you must also define a body-eval rule calling
C<check_uridnsbl()> to use this.
@@ -345,7 +344,7 @@
setting => 'urirhssub',
code => sub {
my ($self, $key, $value, $line) = @_;
- if ($value =~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)$/) {
+ if ($value =~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\d{1,10}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/) {
my $rulename = $1;
my $zone = $2;
my $type = $3;
@@ -638,15 +637,9 @@
}
# bitmask
elsif ($subtest =~ /^\d+$/) {
- if ($rdatastr =~ m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ &&
- Mail::SpamAssassin::Util::my_inet_aton($rdatastr) & $subtest)
+ if ($rdatastr =~ m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ &&
+ Mail::SpamAssassin::Util::my_inet_aton($rdatastr) & $subtest)
{
- $self->got_dnsbl_hit($scanstate, $ent, $rdatastr, $dom, $subrulename);
- }
- }
- # regular expression
- else {
- if ($rdatastr =~ /${subtest}/) {
$self->got_dnsbl_hit($scanstate, $ent, $rdatastr, $dom, $subrulename);
}
}