Jump to content
waynej

Spam Assassin Training Script - Errors Recently

Recommended Posts

My old cgi script for spam assassin training has recently started reporting errors - the lines starting with "Argument" here in the output:

Learning SPAM:
Argument "0.70_01" isn't numeric in numeric ge (>=) at /usr/local/share/perl5/Mail/SpamAssassin/Plugin/AskDNS.pm line 214.
Argument "0.70_01" isn't numeric in numeric lt (<) at /usr/local/share/perl5/Mail/SpamAssassin/Dns.pm line 521.
..........................................................................................................................................................................................................................................................................................................................................................................................................................
Learned tokens from 45 message(s) (410 message(s) examined)


Learning HAM:
Argument "0.70_01" isn't numeric in numeric ge (>=) at /usr/local/share/perl5/Mail/SpamAssassin/Plugin/AskDNS.pm line 214.
Argument "0.70_01" isn't numeric in numeric lt (<) at /usr/local/share/perl5/Mail/SpamAssassin/Dns.pm line 521.
..............................................................
Learned tokens from 4 message(s) (62 message(s) examined)

Here is the (obfuscated) script - is there some updated example I should copy, or is there some newer way to train spam assassin?

#!/usr/bin/perl


my $salearn = "/usr/bin/sa-learn";
$|;


print "Content-type: text/plain\n\n";


print "Learning SPAM:\n";
print `$salearn -p /home/cpanelusername/.spamassassin/user_prefs --spam --showdots /home/cpanelusername/mail/domainname/mailusername/.myspam/{cur,new} 2>&1`;
print "\n\n";


print "Learning HAM:\n";
print `$salearn -p /home/cpanelusername/.spamassassin/user_prefs --ham --showdots /home/cpanelusername/mail/domainname/mailusername/.myham/{cur,new} 2>&1`;
print "\n\n";


exit;

Share this post


Link to post
Share on other sites

Ah, this is discussed in several forums lately. Do a web search for "perl sa-learn Argument isn't numeric in numeric". It's some warning due to perl / spamassassin versions, I guess.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...