Commit 2a9a14a9 authored by sikeda's avatar sikeda
Browse files

[-bug] Mail-DKIM 0.37 looks working sane, despine many "uninitialized"...

[-bug] Mail-DKIM 0.37 looks working sane, despine many "uninitialized" warnings.  As some distributions (e.g. RHEL/CentOS 6) provides this version, required version would be decreased from 0.39 to 0.37.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12834 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent f554fa64
......@@ -430,6 +430,16 @@ sub check_spam_status {
}
}
my $has_mail_dkim_textwrap;
BEGIN {
eval 'use Mail::DKIM::Signer';
# This doesn't export $VERSION.
eval 'use Mail::DKIM::TextWrap';
$has_mail_dkim_textwrap = !$EVAL_ERROR;
# Mail::DKIM::Signer prior to 0.38 doesn't import this.
eval 'use Mail::DKIM::PrivateKey';
}
# Old name: tools::dkim_sign() which took string and returned string.
sub dkim_sign {
$log->syslog('debug', '(%s)', @_);
......@@ -457,13 +467,13 @@ sub dkim_sign {
return undef;
}
unless (eval "require Mail::DKIM::Signer") {
unless ($Mail::DKIM::Signer::VERSION) {
$log->syslog('err',
"Failed to load Mail::DKIM::Signer Perl module, ignoring DKIM signature"
);
return undef;
}
unless (eval "require Mail::DKIM::TextWrap") {
unless ($has_mail_dkim_textwrap) {
$log->syslog('err',
"Failed to load Mail::DKIM::TextWrap Perl module, signature will not be pretty"
);
......
......@@ -262,7 +262,7 @@ our %cpan_modules = (
# Mail::DKIM::Signer is included in Mail-DKIM.
# Mail::DKIM::TextWrap is included in Mail-DKIM.
'Mail::DKIM::Verifier' => {
required_version => '0.39',
required_version => '0.37',
package_name => 'Mail-DKIM',
'gettext_id' =>
'required in order to use DKIM features (both for signature verification and signature insertion)',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment