Bug#960777: libmail-dkim-perl: Argument "1.20200513.1" isn't numeric

Bob Proulx bob at proulx.com
Sat May 23 21:53:04 BST 2020


Elimar Riesebieter wrote:
> Argument "1.20200513.1" isn't numeric in numeric ge (>=) at /usr/share/perl5/Mail/SpamAssassin/Plugin/DKIM.pm line 686
> Argument "1.20200513.1" isn't numeric in numeric ge (>=) at /usr/share/perl5/Mail/SpamAssassin/Plugin/DKIM.pm line 809.

In order to silence the errors and to hopefully work correctly while
waiting for an upstream bug fix I have made the following local hacks
on my system.  Perhaps this will be useful to others too.

--- /var/tmp/DKIM.pm.orig 2020-01-18 01:44:49.000000000 -0700
+++ /usr/share/perl5/Mail/SpamAssassin/Plugin/DKIM.pm 2020-05-23 13:52:41.345815168 -0600
@@ -128,6 +128,7 @@
 use Mail::SpamAssassin::Logger;
 use Mail::SpamAssassin::Timeout;
 
+use version;
 use strict;
 use warnings;
 # use bytes;
@@ -682,8 +683,8 @@
       dbg("dkim: cannot load Mail::DKIM module, DKIM checks disabled: %s",
           $eval_stat);
     } else {
-      my $version = Mail::DKIM::Verifier->VERSION;
-      if ($version >= 0.31) {
+      my $version = version->parse(Mail::DKIM::Verifier->VERSION);
+      if ($version >= version->parse("0.31")) {
         dbg("dkim: using Mail::DKIM version $version");
       } else {
         info("dkim: Mail::DKIM $version is older than the required ".
@@ -806,7 +807,7 @@
     # signature objects not provided by the caller, must verify for ourselves
     my $timemethod = $self->{main}->UNIVERSAL::can("time_method") &&
                      $self->{main}->time_method("check_dkim_signature");
-    if (Mail::DKIM::Verifier->VERSION >= 0.40) {
+    if (version->parse(Mail::DKIM::Verifier->VERSION) >= version->parse("0.40")) {
       my $edns = $conf->{dns_options}->{edns};
       if ($edns && $edns >= 1024) {
         # Let Mail::DKIM use our interface to Net::DNS::Resolver.

Bob



More information about the pkg-perl-maintainers mailing list