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.

Adding rules to spamassassin/configserver.cf have no effect.

Discussion in 'E-mail Discussions' started by jols, Feb 28, 2014.

  1. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Hi, I've asked this question at configserver.com a few days ago, but so far no response. So I am wondering if anyone here, can shed some light?

    I have also combed through all the SA on-line docs and form posts that I can find, still no joy.

    I am not trying to block, but just elevate the overall SA score if email is sent from certain TLDs.

    I've read all the form/group posts and spamassassin instructions pages I can find, but still there's no mention of these new scores in any new headers that I can find (that is sending from one of these domains).

    Here are the new rules I have added to:

    /etc/mail/spamassassin/configserver.cf

    header LOCAL_LS_FROM_DOT_ME ALL =~ /*\.me/i
    score LOCAL_LS_FROM_DOT_ME 2.1

    header LOCAL_LS__FROM_DOT_US ALL =~ /*\.us/i
    score LOCAL_LS_FROM_DOT_US 1.6

    header LOCAL_LS_FROM_DOT_RU ALL =~ /*\.ru/i
    score LOCAL_LS_FROM_DOT_RU 2.2

    header LOCAL_LS_FROM_DOT_RO ALL =~ /*\.ro/i
    score LOCAL_LS_FROM_DOT_RO 2.2



    Do these look okay? Should I restart spamassassin somehow in order for these to take effect, if so, then how would I do this, out side of restarting WHMCS --> Mailscanner

    Thanks much.

    Also, I found instructions to run the following after making a rule change to check for errors:

    spamassassin --lint

    But this does not work at shell. I've searched for a spamassassin binary, so that I may run this command, but can find none.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Have you tried implementing a custom rule like this on an environment without a third-party application such as MailScanner installed? You may want to temporarily disable MailScanner and try implementing the rules directly with SpamAsassin. As for the rules themselves, I will leave this thread open for user-feedback regarding the best way to implement rules like this.

    Thank you.
     
  3. serichards

    serichards Well-Known Member

    Joined:
    Dec 11, 2012
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    When I look on my centos installation it tells me spamassassin is in /usr/local/bin

    I used the which command. Installing mailscanner may lead to spamassassin being moved elsewhere.

    Found on another forum that mailscanner could put them in: Try creating your rules in /usr/mailcleaner/share/spamassassin instead.


    Also if the whitelist/blacklist shortcircuit plugin is being used then could be skipping checking those if those domains are already in a blacklist.
     
  4. 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
    Not familiar with what changes Mailscanner applies, but with the default cPanel installed spamassassin I just edit my config here:

    /etc/mail/spamassassin/local.cf
     
  5. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Thanks for the help folks, I really appreciate it.

    According to ConfigServer I should be able to enter the rules where I did:

    /etc/mail/spamassassin/configserver.cf

    ... and everything should be just fine. I will continue to research the best location for this, but do the rules themselves look okay?
     
  6. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Thanks again folks. I ended up putting the rules at the following per one of the suggestions above:

    /etc/mail/spamassassin/local.cf

    And if anybody is interested, here's what I found works well:

    If you want to add SA scoring to any email where there is a Russian email address in the header, then just use something like this:

    header FROM_DOT_RU ALL =~ /\b@.{1,25}\.ru\b/i
    score FROM_DOT_RU 2.20
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page