"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Mail/SpamAssassin/Plugin/AskDNS.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.

AskDNS.pm  (Mail-SpamAssassin-3.4.4.tar.bz2):AskDNS.pm  (Mail-SpamAssassin-3.4.5.tar.bz2)
skipping to change at line 597 skipping to change at line 597
} }
} else { } else {
# rdatastr() is historical, use rdstring() since Net::DNS 0.69 # rdatastr() is historical, use rdstring() since Net::DNS 0.69
$rr_rdatastr = $rr->UNIVERSAL::can('rdstring') ? $rr->rdstring $rr_rdatastr = $rr->UNIVERSAL::can('rdstring') ? $rr->rdstring
: $rr->rdatastr; : $rr->rdatastr;
utf8::encode($rr_rdatastr) if utf8::is_utf8($rr_rdatastr); utf8::encode($rr_rdatastr) if utf8::is_utf8($rr_rdatastr);
} }
# dbg("askdns: received rr type %s, data: %s", $rr_type, $rr_rdatastr); # dbg("askdns: received rr type %s, data: %s", $rr_type, $rr_rdatastr);
} }
my $j = 0;
for my $q_tuple (!ref $queries_ref ? () : @$queries_ref) { for my $q_tuple (!ref $queries_ref ? () : @$queries_ref) {
next if !$q_tuple; next if !$q_tuple;
my($query_type, $answer_types_ref, $rules) = @$q_tuple; my($query_type, $answer_types_ref, $rules) = @$q_tuple;
next if !defined $qtype || $query_type ne $qtype; next if !defined $qtype;
$answer_types_ref = [$query_type] if !defined $answer_types_ref; $answer_types_ref = [$query_type] if !defined $answer_types_ref;
# mark rule as done
$pms->{askdns_map_dnskey_to_rules}{$dnskey}[$j++] = undef;
while (my($rulename,$subtest) = each %$rules) { while (my($rulename,$subtest) = each %$rules) {
my $match; my $match;
local($1,$2,$3); local($1,$2,$3);
if (ref $subtest eq 'HASH') { # a list of DNS rcodes (as hash keys) if (ref $subtest eq 'HASH') { # a list of DNS rcodes (as hash keys)
$match = 1 if $subtest->{$rcode}; $match = 1 if $subtest->{$rcode};
} elsif ($rcode != 0) { } elsif ($rcode != 0) {
# skip remaining tests on DNS error # skip remaining tests on DNS error
} elsif (!defined($rr_type) || } elsif (!defined($rr_type) ||
!grep($_ eq 'ANY' || $_ eq $rr_type, @$answer_types_ref) ) { !grep($_ eq 'ANY' || $_ eq $rr_type, @$answer_types_ref) ) {
# skip remaining tests on wrong RR type # skip remaining tests on wrong RR type
 End of changes. 3 change blocks. 
5 lines changed or deleted 1 lines changed or added

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