The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to properly use sa-learn?

Discussion in 'E-mail Discussions' started by joako, Mar 16, 2015.

  1. joako

    joako Well-Known Member

    Joined:
    Aug 7, 2003
    Messages:
    97
    Likes Received:
    2
    Trophy Points:
    8
    I have one account that gets too much spam. I enable sa-lean in the spamassassin configuration and then run it against the mail directories. The sa-learn shows that the minimum of 200 spam and 200 ham have been processed, but in the inbound email headers there is no indication that it is being used.

    What is the proper way to have sa-learn working for at least one account?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,481
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    As commented on that link, the spam will keep coming, but good luck anyway.

    Google the email address that's getting all the spam, do you find it? If yes, so do email scrapers. Over and over and over again. And, they'll send new spam to it using new email addresses fully passable by spam filtering emails.

    Users need to learn to better obfuscate their email addresses on their own webpages, use secure contact forms, and should never ever post it anywhere if they can help it. But they don't.

    If you want to end the spam on that email account quick and easy? Kill the email account when it gets that bad. Or, see if the results found on searching for the email via google, can be scrubbed from the websites you found it on.

    Not the answer you were looking for, I'm sure. :rolleyes:
     
  3. joako

    joako Well-Known Member

    Joined:
    Aug 7, 2003
    Messages:
    97
    Likes Received:
    2
    Trophy Points:
    8
    When I read that documentation, it says to put in the config file:

    bayes_path /var/spamassassin/bayes_db/bayes

    But when I run sa-learn it creates /root/.spamassassin and in there is bayes_journal, bayes_seen, bayes_toks, and sa-compile.cache/. There is no bayes_db directory or any file called bayes.

    In /etc/mail/spamassassin/local.cf I already put:

    use_bayes 1
    bayes_auto_learn 1

    And I see for the users that have spamassassin enabled there is a ~/.spamassassin exactly like root's but still in the headers of received messages there is no indication that bayes is being used.
     
  4. joako

    joako Well-Known Member

    Joined:
    Aug 7, 2003
    Messages:
    97
    Likes Received:
    2
    Trophy Points:
    8
    How can I edit the scores assigned to particular spamassassin rules on a global basis, and ensure these changes survive any spam rules updates? For e.g. this rule I would like for it to be assigned more points:

    1.7 RAZOR2_CHECK Listed in Razor2 (http://razor.sf.net/)
     
  5. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    262
    Likes Received:
    12
    Trophy Points:
    18
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    Edit /etc/mail/spamassassin/local.cf

    Add:
    score RAZOR2_CHECK #.#

    # - your score numbers

    Then restart spamd
    /scripts/restartsrv_spamd

    or restart Exim from WHM or with the following which will also restart spamd.
    /scripts/restartsrv_exim
     
  6. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    262
    Likes Received:
    12
    Trophy Points:
    18
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    After activating Bayes, you need to wait until after a few hundred SPAM and HAM emails are received before it actually starts scoring the emails. So you should see the bayes files being created for the accounts, but may need to wait some time before seeing the effect.
     
Loading...

Share This Page