"Fossies" - the Fresh Open Source Software Archive  

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

DKIM.pm  (Mail-SpamAssassin-3.4.3.tar.bz2):DKIM.pm  (Mail-SpamAssassin-3.4.4.tar.bz2)
skipping to change at line 833 skipping to change at line 833
return; return;
} }
$pms->{dkim_verifier} = $verifier; $pms->{dkim_verifier} = $verifier;
# #
# feed content of a message into verifier, using \r\n endings, # feed content of a message into verifier, using \r\n endings,
# required by Mail::DKIM API (see bug 5300) # required by Mail::DKIM API (see bug 5300)
# note: bug 5179 comment 28: perl does silly things on non-Unix platforms # note: bug 5179 comment 28: perl does silly things on non-Unix platforms
# unless we use \015\012 instead of \r\n # unless we use \015\012 instead of \r\n
eval { eval {
my $str = $pms->{msg}->get_pristine(); my $str = $pms->{msg}->get_pristine();
if ($pms->{msg}->{line_ending} eq "\015\012") { $str =~ s/\r?\n/\015\012/sg; # ensure \015\012 ending
# message already CRLF, just feed it $verifier->PRINT($str);
$verifier->PRINT($str);
} else {
# feeding large chunk to Mail::DKIM is _much_ faster than line-by-line
my $str2 = $str; # make a copy, sigh
$str2 =~ s/\012/\015\012/gs; # LF -> CRLF
$verifier->PRINT($str2);
undef $str2;
}
1; 1;
} or do { # intercept die() exceptions and render safe } or do { # intercept die() exceptions and render safe
my $eval_stat = $@ ne '' ? $@ : "errno=$!"; chomp $eval_stat; my $eval_stat = $@ ne '' ? $@ : "errno=$!"; chomp $eval_stat;
dbg("dkim: verification failed, intercepted error: $eval_stat"); dbg("dkim: verification failed, intercepted error: $eval_stat");
return 0; # cannot verify message return 0; # cannot verify message
}; };
my $timeout = $conf->{dkim_timeout}; my $timeout = $conf->{dkim_timeout};
my $timer = Mail::SpamAssassin::Timeout->new( my $timer = Mail::SpamAssassin::Timeout->new(
{ secs => $timeout, deadline => $pms->{master_deadline} }); { secs => $timeout, deadline => $pms->{master_deadline} });
 End of changes. 1 change blocks. 
10 lines changed or deleted 2 lines changed or added

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