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.

Trying to set up server wide Spamassassin bayes learning

Discussion in 'E-mail Discussions' started by DigitalEssence, May 28, 2014.

  1. DigitalEssence

    Joined:
    May 21, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    I've got Spamassassin enabled but most of my clients don't know how or where to set it up in CPanel or how to tweak the scores so I wanted to enable server wide settings and make it easy for them.

    I'm looking in /etc/mail/spamassassin and have edited the local.cf file and changed:

    # rewrite_header Subject *****SPAM*****
    to

    rewrite_header Subject [SPAM]

    #use_bayes 1

    to

    use_bayes 1

    and

    #bayes_auto_learn 1

    to

    bayes_auto_learn 1

    but emails are still being tagged with ***SPAM*** which I can't see anywhere in this file. I've tried to grep
    for ***SPAM*** but it didn't return anything or I used the wrong command (more than likely).

    Ultimately I want spamassassin to auto learn and reduce the number of spam mails but I've fallen at the first hurdle int hat the config file I thought was the right one obviously isn't.

    Can anyone please advise?

    Thank you,

    Hedley
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    In "WHM Home » Service Configuration » Exim Configuration Manager", under the "Filters" tab, you can modify the following options:

    SpamAssassin™: Global Subject Rewrite
    SpamAssassin™: X-Spam-Subject/Subject header prefix for spam emails


    Thank you.
     
  3. DigitalEssence

    Joined:
    May 21, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Oh,

    I'm using CENTOS 6.5 x86_64 with WHM 11.42.1.

    - - - Updated - - -

    Oh knob,

    I've just found it:

    WHM > Home »Service Configuration »Exim Configuration Manager > SpamAssassin™: X-Spam-Subject/Subject header prefix for spam emails

    Ok. My next question is why is this setting overwriting the local.cf file and how do I enable spamassassin bayesian learning for all accounts?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The options from my previous response are available in cPanel version 11.42. It's not OS-dependent. The method you used to enable "bayes_auto_learn" and "use_bayes" globally should work. Let us know if it's not working.

    Thanks.
     
  5. DigitalEssence

    Joined:
    May 21, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks Michael,

    I'd replied to the post without refreshing so hadn't seen your reply. Typically after hours of searching I only found it AFTER posting on the forum.

    Can I just ask: I changed the setting in WHM from default to custom and then left the field blank hoping that the setting in the local.cf file would take precedence but test spam mails are now coming with nothing prepended to the subject.

    Is it just the "X-Spam-Subject/Subject header prefix for spam emails" that overides the local.cf file or are there other settings?

    Thanks and sorry for being so dim. I'm very very new to all this.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You can disable the "SpamAssassin™: Global Subject Rewrite" option itself if you prefer there to be no subject rewrite. I suggest using Web Host Manager for these options instead of editing the /etc/mail/spamassassin/local.cf file. That being said, it's not possible to modify the other settings you referenced in Web Host Manager. Instead, those values can be edited by directly modifying the local.cf file and then restarting SpamAssassin.

    Thank you.
     
Loading...

Share This Page