"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Mail/SpamAssassin/Plugin/HeaderEval.pm" between
Mail-SpamAssassin-3.4.3.tar.bz2 and Mail-SpamAssassin-3.4.4.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.

HeaderEval.pm  (Mail-SpamAssassin-3.4.3.tar.bz2):HeaderEval.pm  (Mail-SpamAssassin-3.4.4.tar.bz2)
skipping to change at line 923 skipping to change at line 923
@diffs = sort { abs($a) <=> abs($b) } @diffs; @diffs = sort { abs($a) <=> abs($b) } @diffs;
$pms->{date_diff} = $diffs[0]; $pms->{date_diff} = $diffs[0];
} }
sub subject_is_all_caps { sub subject_is_all_caps {
my ($self, $pms) = @_; my ($self, $pms) = @_;
my $subject = $pms->get('Subject'); my $subject = $pms->get('Subject');
$subject =~ s/^\s+//; $subject =~ s/^\s+//;
$subject =~ s/\s+$//; $subject =~ s/\s+$//;
$subject =~ s/^(?:(?:Re|Fwd|Fw|Aw|Antwort|Sv|VS):\s*)+//i; # Bug 6805 $subject =~ s/^(?:(?:Re|Fwd|Fw|Aw|Antwort|WG|SV|VB|VS|VL):\s*)+//i; # Bug 68 05
return 0 if $subject !~ /\s/; # don't match one word subjects return 0 if $subject !~ /\s/; # don't match one word subjects
return 0 if (length $subject < 10); # don't match short subjects return 0 if (length $subject < 10); # don't match short subjects
$subject =~ s/[^a-zA-Z]//g; # only look at letters $subject =~ s/[^a-zA-Z]//g; # only look at letters
# now, check to see if the subject is encoded using a non-ASCII charset. # now, check to see if the subject is encoded using a non-ASCII charset.
# If so, punt on this test to avoid FPs. We just list the known charsets # If so, punt on this test to avoid FPs. We just list the known charsets
# this test will FP on, here. # this test will FP on, here.
my $subjraw = $pms->get('Subject:raw'); my $subjraw = $pms->get('Subject:raw');
my $CLTFAC = Mail::SpamAssassin::Constants::CHARSETS_LIKELY_TO_FP_AS_CAPS; my $CLTFAC = Mail::SpamAssassin::Constants::CHARSETS_LIKELY_TO_FP_AS_CAPS;
if ($subjraw =~ /=\?${CLTFAC}\?/i) { if ($subjraw =~ /=\?${CLTFAC}\?/i) {
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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