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.

Edit Scores in Apache SpamAssassin

Discussion in 'E-mail Discussions' started by tiff2342, Dec 14, 2012.

  1. tiff2342

    tiff2342 Well-Known Member

    Joined:
    Apr 20, 2012
    Messages:
    140
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I want to edit the scores for RBLs for an individual account is that possible?

    example of:
    1.7 URIBL_DBL_SPAM Contains an URL listed in the DBL blocklist

    I would like to make that score a 5.0 along with all the other RBLs


    Do i edit the values under
    /var/lib/spamassassin/3.003001/updates_spamassassin_org/50_scores.cf

    or can i do it under the user account for just them?

    then do i need to restart spam assassin after making changes?
     
    #1 tiff2342, Dec 14, 2012
    Last edited: Dec 14, 2012
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Re: spam assassin

    Assuming that in WHM --> Exim Configuration Editor you are allowing each user to choose to enable/disable Spamassassin on their own, you can edit rule scores in their own user_perfs in /home/<accountname>/.spamassassin/user_prefs

    If you have it set in the Exim Configuration Editor so that SpamAssassin works globally on the server, then those individual user preferences aren't going to work to my knowledge, and you'd then have to edit the main SpamAssassin rule scores.

    M
     
  3. ovisopa

    ovisopa Member

    Joined:
    Apr 12, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Re: spam assassin

    Hello guys, I also want to increase the score for some filters
    1.7 URIBL_DBL_SPAM
    1.4 RCVD_IN_BRBL_LASTEXT

    Can someone tell me what should I modify in the main config file /var/lib/spamassassin/3.003001/updates_spamassassin_org/50_scores.cf

    Or what should I add in the user_prefs config files to overide the global configs ?

    thank you.
     
  4. ovisopa

    ovisopa Member

    Joined:
    Apr 12, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Re: spam assassin

    I updated 50_scores.cf file and restarted spamd , everything is fine now, more and more spam is rejected

    score URIBL_DBL_SPAM 0 4.7 0 4.7
    score RCVD_IN_SORBS_DUL 0 0.9 0 0.9 # n=0 n=2
     
  5. ovisopa

    ovisopa Member

    Joined:
    Apr 12, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Re: spam assassin

    I also updated the 50_scores.cf regurarly but now I noticed a filter I set past week is back at the default value, I made a txt file so I know what records I set in the past and I can see that RCVD_IN_BRBL_LASTEXT was set to 6.644 as defined bellow:

    score RCVD_IN_BRBL_LASTEXT 0 6.644 0 6.449 # n=0 n=2

    But now, I have received another spam message, in the headers was the same filter RCVD_IN_BRBL_LASTEXT, but the score is 1.4, I have opened the 50_scores.cf file and yes, I confirm the value I set last week was changed back to 1.4

    score RCVD_IN_BRBL_LASTEXT 0 1.644 0 1.449 # n=0 n=2

    Is this file updated automaticaly by cpanel ?

    What can I do to make the changes permanent?


    PS. I have saved the file and restarted exim everytime I modified it, and double check now, the values I set again now are there even after restart.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    670
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Re: spam assassin

    Hello :)

    Try forcing an update of cPanel via:

    Code:
    /scripts/upcp --force
    Do you notice the values are reverted to default after the cPanel update?

    Thank you.
     
  7. 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
    Re: spam assassin

    Don't modify any scores.cf files since they will get replaced when cpanel updates the spamassassin rules.

    You should place any rule modifications, custom rules and other configuration parameters in:

    /etc/mail/spamassassin/local.cf
     
  8. ovisopa

    ovisopa Member

    Joined:
    Apr 12, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Re: spam assassin

    Thank you for the tip, so I have just to copy the modified lines in the local.cf file right ? It's the same syntax ?
     
  9. 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
    Re: spam assassin

    Yeah, you can just copy / paste the score line and change the values.

    You can also use the local.cf to define your own rules and change default spamassassin configuration settings.
     
Loading...

Share This Page