sa-learn on MailCleaner

Posted at 8:22:05 PM in Spam Management Gateways (6) | Read count: 2750

One of the things that seems apparent in Mailcleaner is you will have to train the Bayesian filter yourself.  They had a script for it at one time, but that doesn't appear to be anywhere in the new installations. Here is the line to run:

Code:
sa-learn -C /usr/mailcleaner/etc/mailscanner/spam.assassin.prefs.conf --ham ham.eml
sa-learn -C /usr/mailcleaner/etc/mailscanner/spam.assassin.prefs.conf --spam spam.eml
That info comes from this page. I replace the specifice email "ham.eml" with the directory of emails. You can also add --showdots which will give you some indication it is processing.
 
If you get a bunch of errors on parser.pm, like these:
 
Code:
netset: cannot include 146.164.36.14/32 as it has already been included
Use of uninitialized value $type in numeric eq (==) at /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Conf/Parser.pm line 668.
Use of uninitialized value $type in numeric eq (==) at /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Conf/Parser.pm line 671.
Use of uninitialized value $type in numeric eq (==) at /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Conf/Parser.pm line 674.
Use of uninitialized value $type in numeric eq (==) at /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Conf/Parser.pm line 677.
Use of uninitialized value $type in numeric eq (==) at /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Conf/Parser.pm line 680.
Use of uninitialized value $type in numeric eq (==) at /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Conf/Parser.pm line 683.
Use of uninitialized value $type in numeric eq (==) at /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Conf/Parser.pm line 686.
Use of uninitialized value $type in numeric eq (==) at /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Conf/Parser.pm line 689.
Use of uninitialized value $type in numeric eq (==) at /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Conf/Parser.pm line 692.
Use of uninitialized value $type in numeric eq (==) at /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Conf/Parser.pm line 695.
Use of uninitialized value $type in concatenation (.) or string at /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Conf/Parser.pm line 699.
config: unknown conf type ! at /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Conf/Parser.pm line 699.
 
This fix is:
 

 

There's a typo in /usr/local/share/perl/5.10.1/Mail/SpamAssassin/Plugin/Razor2.pm :

On line 118, change:

type => $Mail::SpamAssassin::Conf::CONF_TYPE_DURATIION,

to:

type => $Mail::SpamAssassin::Conf::CONF_TYPE_DURATION,

 

As indicated on this page.

 

Written by Leonard Rogers on Wednesday, February 4, 2015 | Comments (0)


    Name
    URL
    Email
    Email address is not published
    Remember Me
    Comments

    CAPTCHA Reload
    Write the characters in the image above