Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument "1.20200513.1" isn't numeric #8

Closed
riesebie opened this issue May 16, 2020 · 5 comments
Closed

Argument "1.20200513.1" isn't numeric #8

riesebie opened this issue May 16, 2020 · 5 comments
Assignees

Comments

@riesebie
Copy link

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.

@realsimix
Copy link

Maybe the second dot could just be removed to make a numeric version check possible again?

@gregoa
Copy link

gregoa commented May 18, 2020

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 :))

@riesebie
Copy link
Author

What is the story behind changing the version numbering?

@realsimix
Copy link

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 👎

@marcbradshaw marcbradshaw self-assigned this Jul 7, 2020
@marcbradshaw
Copy link
Member

This was added to make it easier to have multiple releases on a single day, that said, I have no strong attachment to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants