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.

Apache SpamAssassin 3.0 stable is out!

Discussion in 'EasyApache' started by foxboy, Sep 23, 2004.

  1. foxboy

    foxboy Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Just released: Spamassassin 3.0, this time under the apache license.
    When will it be implemented in cPanel?
     
  2. Promethyl

    Promethyl Well-Known Member

    Joined:
    Mar 27, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
  3. foxboy

    foxboy Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    it goes automaticly :D
     
  4. SiteLink

    SiteLink Member

    Joined:
    Nov 8, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    The only problem with this is cPanel does not support the new "rewrite_header" configuration option, which replaced the 2.x "rewrite_subject" and "subject_tag" options. So you have to go through and change these manually for each user account on your system. If you change the SpamAssassin configuration from within cPanel, it uses the old options, which do not work on 3.0. Will there be a new release to integrate these new option settings. See http://spamassassin.apache.org/full/3.0.x/dist/UPGRADE.

    ----------
    - The "rewrite_subject" and "subject_tag" configuration options were
    deprecated and are now removed. Instead, using "rewrite_header Subject
    [your desired setting]". e.g.

    rewrite_subject 1
    subject_tag ****SPAM(_SCORE_)****

    becomes

    rewrite_header Subject ****SPAM(_SCORE_)****
     
  5. cretu

    cretu Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    208
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I hoping for the patch from cPanel team to overcome this problem.

    Cretu
     
  6. albatroz

    albatroz Well-Known Member

    Joined:
    Mar 6, 2003
    Messages:
    258
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Virtual Orbis / Peru
    cPanel Access Level:
    Root Administrator
    Me too!

    Regards
    Alejandro
     
  7. equens

    equens Well-Known Member

    Joined:
    Feb 8, 2002
    Messages:
    270
    Likes Received:
    0
    Trophy Points:
    16
    This configuration in spamassassin.options (/usr/local/cpanel/etc) works for me!

    PHP:
    score=0=
    ==;;
    whitelist_from=0=

    ==;;
    blacklist_from=0=

    ==;;
    required_hits=1=
    =%
    .2f=5;;

    rewrite_header=1=
    ==
    Subject ****SPAM(_SCORE_)****;;


    Ej:

    Sent: Tuesday, September 28, 2004 7:42 PM
    Subject: ****SPAM(32.2)**** Do You Love S.e.x?

    Good Look!
     
  8. equens

    equens Well-Known Member

    Joined:
    Feb 8, 2002
    Messages:
    270
    Likes Received:
    0
    Trophy Points:
    16
    Filtering the Subject ****SPAM(_SCORE_)****

    I would like to know if is possible to filter emails depending on the SA SCORE. If the score is more than 10 we can discard the email, but if the score is under 10 we can redirect to spam@ourdomain.com to search false spam.

    We can create filters like $header_subject: begins "****SPAM(3" but this filter affects to score 3 and score 30. So we can create filters like...

    $header_subject: begins "****SPAM(9.1"
    $header_subject: begins "****SPAM(9.2"
    $header_subject: begins "****SPAM(9.3"
    $header_subject: begins "****SPAM(9.4"
    $header_subject: begins "****SPAM(9.5"
    $header_subject: begins "****SPAM(9.6"

    Ufff, are there other solution to redirect these messages depending on the score?
    Thanks!
     
  9. SiteLink

    SiteLink Member

    Joined:
    Nov 8, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Assuming you're using cPanel, the best way to route spam-tagged email is to use:

    $message_headers matches "X-Spam-Level: \\\\*{a,b}"

    where "a" is the low threshold, and "b" is the high threshold.

    To use this in cPanel, select "Mail" -> "Email Filtering", click "Add Filter", then select "Any Header" that "Matches" - and enter "X-Spam-Level: \\\\*{a,b}", replacing 'a' and 'b' with your thresholds. Then select what to do the the matched email.

    You can also use "X-Spam-Level: \\\\*{a,}" to match 'a' or higher. Note this is a standard regexp, except four backslashes are required instead of one for reasons known only to cPanel developers! :)
     
  10. SiteLink

    SiteLink Member

    Joined:
    Nov 8, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    With thanks to equens, here is a more complete cPanel config file for SA 3.0...

    Code:
    score=0=
    Assign scores (the number of points for a hit) to a given test. Scores
    can be positive or negative real numbers or integers.
    "SYMBOLIC_TEST_NAME" is the symbolic name used by SpamAssassin for that
    test; for example, 'FROM_ENDS_IN_NU'. If only one valid score is listed,
    then that score is always used for a test. If four valid scores are
    listed, then the score that is used depends on how SpamAssassin is being
    used. The first score is used when both Bayes and network tests are
    disabled. The second score is used when Bayes is disabled, but network
    tests are enabled. The third score is used when Bayes is enabled and
    network tests are disabled. The fourth score is used when Bayes is
    enabled and network tests are enabled. Setting a rule's score to 0 will
    disable that rule from running.
    ==;;
    whitelist_from=0=
    Used to specify addresses which send mail that is often tagged
    (incorrectly) as spam; it also helps if they are addresses of big
    companies with lots of lawyers. This way, if spammers impersonate them,
    they'll get into big trouble, so it doesn't provide a shortcut around
    SpamAssassin. Whitelist and blacklist addresses are now file-glob-style
    patterns, so friend@somewhere.com, *@isp.com, or *.domain.net will all
    work. Specifically, * and ? are allowed, but all other metacharacters
    are not. Regular expressions are not used for security reasons.
    ==;;
    blacklist_from=0=
    Used to specify addresses which send mail that is often tagged
    (incorrectly) as non-spam, but which the user doesn't want. Same format
    as whitelist_from.
    ==;;
    required_score=1=
    Set the score required before a mail is considered spam. n.nn can be an
    integer or a real number. 5.0 is the default setting, and is quite
    aggressive; it would be suitable for a single-user setup, but if you're
    an ISP installing SpamAssassin, you should probably set the default to
    be more conservative, like 8.0 or 10.0
    =%.2f=5;;
    rewrite_header=1=
    Text added to the "Subject" line of mails that are considered spam.
    _SCORE_ in the tag will be replaced with the calculated score for this
    message. _SCORE(00)_ will pad the score with zeros to ensure 3 digits
    before the decimal point. _REQD_ will be replaced with the threshold.
    Enter "Subject " followed by text to be prepended to the subject line.
    ==Subject *****SPAM*****;;
    
     
  11. equens

    equens Well-Known Member

    Joined:
    Feb 8, 2002
    Messages:
    270
    Likes Received:
    0
    Trophy Points:
    16
    Great!!

    Hi SiteLink!!
    Thank you very much for the explanation of Email Filtering in Cpanel. I can see that required_score is the new tag for required_hits. I think we can do a more usefully configuration for cpanel users. I hope to work soon on it.
     
  12. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    Just lovely. Now we literally have thousands of users all complaining that SA isn't working (because their subject lines aren't being altered). How frickin peachy!
     
  13. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA

    well same here for almost a full week now for 3 of my boxes. when you get 5k spams a day and before they were tagged ..and then bam TONS in your box you start to appreachate what SA does!!!

    I used that config file Sitelink posted and it works great!!! however cpanel update last night blew that out. there is a bug open on this.

    http://bugzilla.cpanel.net/show_bug.cgi?id=1309

    I guess 10 minutes of work to help 2000 people is too much for these guys. If I call Nick he will fix this in 5 minutes.
     
  14. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    Indeed, we're now having to go into each user's /.spamassassin/user_prefs file and update the rewrites and then bounce exim. SA 3 should have never been pushed out if this step wasn't going to be automated.
     
  15. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    18
    Somebody posted a little perl script on the forum a day or two ago that will do this editing server wide with just one command. It is replace command, so if subject rewriting was not turned on it in the first place, it won't affect that client. Do a search and find that script. I was able to fix 5 servers in about 5 minutes.
     
  16. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    Thanks, but were in the middle of writing our own already with a few extra needed steps such as syncing sa-learn to get rid the DBM errors and deploying updated rulesets.
     
  17. SageBrian

    SageBrian Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    415
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    NY/CT (US)
    cPanel Access Level:
    Root Administrator
    I believe the thread that has the script is here:
    http://forums.cpanel.net/showthread.php?t=29807&highlight=rewrite_subject
     
  18. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    The high threshold must be something new in SA3? SA 2.64 doesn't have that.
     
  19. SiteLink

    SiteLink Member

    Joined:
    Nov 8, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    It's not a function of SA, it's in cPanel. It's just a standard mail filter that discards any mail with 9 or more stars in the "X-Spam-Level" header, which is added by SA.
     
  20. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    The mail filters are not new (they are about 3 years old :D), filtering by SA's scoring is not new, but the high threshold you mentioned in your example is new.

    Your regex is extremely useful. Does it work when the catch-all address is the account user name? There was a problem about the filters going into action before SA in those instances.
     
Loading...

Share This Page