Closed riesebie closed 4 years ago
Maybe the second dot could just be removed to make a numeric version check possible again?
I believe that "1.20200513.1" is a perfectly valid version string, and that the SpamAssassin plugin shouldn't do a numerical comparsion on it. (Of course I also won't complain if it's changed :))
What is the story behind changing the version numbering?
Sure, "1.20200513.1" is a valid version string just like "aa.bb.cc" would also be valid. Only problem is that it breaks other applications using it.
Now, let's have a look at how mail-dkim itself does version checks in Mail-DKIM-1.20200513.1/lib/Mail/DKIM/PublicKey.pm:
# join with no intervening spaces, RFC 6376
if ( Net::DNS->VERSION >= 0.69 ) {
# must call txtdata() in a list context
$strn = join '', $rr->txtdata;
}
It does an arithmetic version check, like dozens of other perl programs do. That's why you may call the version string valid, but I won't call it perfect :-1:
This was added to make it easier to have multiple releases on a single day, that said, I have no strong attachment to it.
Running
/usr/bin/sa-learn --sync
via a cronjob of amavisd-new complains about wrong arguments: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.
This seems to be caused by the new versioning of libmail-dkim-perl.