"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm" between
Mail-SpamAssassin-3.4.4.tar.bz2 and Mail-SpamAssassin-3.4.5.tar.bz2

About: SpamAssassin is a mail filter that uses a wide range of heuristic tests on mail headers and body text to identify "spam" (also known as unsolicited commercial email) incl. Bayesian (statistical) spam filter and several internet-based realtime blacklists.

URIDNSBL.pm  (Mail-SpamAssassin-3.4.4.tar.bz2):URIDNSBL.pm  (Mail-SpamAssassin-3.4.5.tar.bz2)
skipping to change at line 1162 skipping to change at line 1162
$self->got_dnsbl_hit($pms, $ent, $rdatastr, $dom, $rulename) if $match; $self->got_dnsbl_hit($pms, $ent, $rdatastr, $dom, $rulename) if $match;
} }
} }
sub got_dnsbl_hit { sub got_dnsbl_hit {
my ($self, $pms, $ent, $str, $dom, $rulename) = @_; my ($self, $pms, $ent, $str, $dom, $rulename) = @_;
$str =~ s/\s+/ /gs; # long whitespace => short $str =~ s/\s+/ /gs; # long whitespace => short
dbg("uridnsbl: domain \"$dom\" listed ($rulename): $str"); dbg("uridnsbl: domain \"$dom\" listed ($rulename): $str");
if (!defined $pms->{uridnsbl_hits}->{$rulename}) {
$pms->{uridnsbl_hits}->{$rulename} = { };
};
$pms->{uridnsbl_hits}->{$rulename}->{$dom} = 1;
if ( $pms->{uridnsbl_active_rules_nsrevipbl}->{$rulename} if ( $pms->{uridnsbl_active_rules_nsrevipbl}->{$rulename}
|| $pms->{uridnsbl_active_rules_arevipbl}->{$rulename} || $pms->{uridnsbl_active_rules_arevipbl}->{$rulename}
|| $pms->{uridnsbl_active_rules_nsrhsbl}->{$rulename} || $pms->{uridnsbl_active_rules_nsrhsbl}->{$rulename}
|| $pms->{uridnsbl_active_rules_fullnsrhsbl}->{$rulename} || $pms->{uridnsbl_active_rules_fullnsrhsbl}->{$rulename}
|| $pms->{uridnsbl_active_rules_rhsbl}->{$rulename} || $pms->{uridnsbl_active_rules_rhsbl}->{$rulename}
|| $pms->{uridnsbl_active_rules_rhsbl_ipsonly}->{$rulename} || $pms->{uridnsbl_active_rules_rhsbl_ipsonly}->{$rulename}
|| $pms->{uridnsbl_active_rules_rhsbl_domsonly}->{$rulename}) || $pms->{uridnsbl_active_rules_rhsbl_domsonly}->{$rulename})
{ {
# TODO: this needs to handle multiple domain hits per rule # Hits are saved and called in check_cleanup
$pms->clear_test_state(); $pms->{uridnsbl_hits}->{$rulename}->{$dom} = 1;
my $uris = join (' ', keys %{$pms->{uridnsbl_hits}->{$rulename}}); }
$pms->test_log ("URIs: $uris"); }
$pms->got_hit ($rulename, "");
sub check_cleanup {
my ($self, $opts) = @_;
my $pms = $opts->{permsgstatus};
# note that this rule has completed (since it got at least 1 hit) # Call any remaining hits
$pms->register_async_rule_finish($rulename); foreach my $rulename (keys %{$pms->{uridnsbl_hits}}) {
$pms->test_log("URIs: ".join(', ', sort keys %{$pms->{uridnsbl_hits}->{$rule
name}}));
$pms->got_hit($rulename, '');
} }
} }
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# capability checks for "if can()": # capability checks for "if can()":
# #
sub has_tflags_domains_only { 1 } sub has_tflags_domains_only { 1 }
sub has_subtest_for_ranges { 1 } sub has_subtest_for_ranges { 1 }
sub has_uridnsbl_for_a { 1 } # uridnsbl rules recognize tflags 'a' and 'ns' sub has_uridnsbl_for_a { 1 } # uridnsbl rules recognize tflags 'a' and 'ns'
 End of changes. 3 change blocks. 
12 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)