"Fossies" - the Fresh Open Source Software Archive  

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

DKIM.pm  (Mail-SpamAssassin-3.4.4.tar.bz2):DKIM.pm  (Mail-SpamAssassin-3.4.5.tar.bz2)
skipping to change at line 684 skipping to change at line 684
{ require Mail::DKIM::Verifier } { require Mail::DKIM::Verifier }
} or do { } or do {
$eval_stat = $@ ne '' ? $@ : "errno=$!"; chomp $eval_stat; $eval_stat = $@ ne '' ? $@ : "errno=$!"; chomp $eval_stat;
}; };
$self->{tried_loading} = 1; $self->{tried_loading} = 1;
if (defined $eval_stat) { if (defined $eval_stat) {
dbg("dkim: cannot load Mail::DKIM module, DKIM checks disabled: %s", dbg("dkim: cannot load Mail::DKIM module, DKIM checks disabled: %s",
$eval_stat); $eval_stat);
} else { } else {
use version 0.77;
my $version = Mail::DKIM::Verifier->VERSION; my $version = Mail::DKIM::Verifier->VERSION;
if ($version >= 0.31) { if (version->parse($version) >= version->parse(0.31)) {
dbg("dkim: using Mail::DKIM version $version"); dbg("dkim: using Mail::DKIM version $version");
} else { } else {
info("dkim: Mail::DKIM $version is older than the required ". info("dkim: Mail::DKIM $version is older than the required ".
"minimal version 0.31, suggested upgrade to 0.37 or later!"); "minimal version 0.31, suggested upgrade to 0.37 or later!");
} }
$self->{service_available} = 1; $self->{service_available} = 1;
my $adsp_avail = my $adsp_avail =
eval { require Mail::DKIM::AuthorDomainPolicy }; # since 0.34 eval { require Mail::DKIM::AuthorDomainPolicy }; # since 0.34
if (!$adsp_avail) { # fallback to pre-ADSP policy if (!$adsp_avail) { # fallback to pre-ADSP policy
skipping to change at line 808 skipping to change at line 809
if ($pms->{dkim_signatures_ready}) { if ($pms->{dkim_signatures_ready}) {
# signatures already available and verified # signatures already available and verified
} elsif (!$pms->is_dns_available()) { } elsif (!$pms->is_dns_available()) {
dbg("dkim: signature verification disabled, DNS resolving not available"); dbg("dkim: signature verification disabled, DNS resolving not available");
} elsif (!$self->_dkim_load_modules()) { } elsif (!$self->_dkim_load_modules()) {
# Mail::DKIM module not available # Mail::DKIM module not available
} else { } else {
# signature objects not provided by the caller, must verify for ourselves # signature objects not provided by the caller, must verify for ourselves
my $timemethod = $self->{main}->UNIVERSAL::can("time_method") && my $timemethod = $self->{main}->UNIVERSAL::can("time_method") &&
$self->{main}->time_method("check_dkim_signature"); $self->{main}->time_method("check_dkim_signature");
if (Mail::DKIM::Verifier->VERSION >= 0.40) { use version 0.77;
if (version->parse(Mail::DKIM::Verifier->VERSION) >= version->parse(0.40)) {
my $edns = $conf->{dns_options}->{edns}; my $edns = $conf->{dns_options}->{edns};
if ($edns && $edns >= 1024) { if ($edns && $edns >= 1024) {
# Let Mail::DKIM use our interface to Net::DNS::Resolver. # Let Mail::DKIM use our interface to Net::DNS::Resolver.
# Only do so if EDNS0 provides a reasonably-sized UDP payload size, # Only do so if EDNS0 provides a reasonably-sized UDP payload size,
# as our interface does not provide a DNS fallback to TCP, unlike # as our interface does not provide a DNS fallback to TCP, unlike
# the Net::DNS::Resolver::send which does provide it. # the Net::DNS::Resolver::send which does provide it.
my $res = $self->{main}->{resolver}; my $res = $self->{main}->{resolver};
dbg("dkim: providing our own resolver: %s", ref $res); dbg("dkim: providing our own resolver: %s", ref $res);
Mail::DKIM::DNS::resolver($res); Mail::DKIM::DNS::resolver($res);
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added

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