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.

Using the CPanel Filter and Spam Assassin

Discussion in 'General Discussion' started by stocosoft, Nov 27, 2003.

  1. stocosoft

    stocosoft Active Member

    Joined:
    Nov 14, 2003
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Okay - here is the deal. I am looking for the right answer and not a hack. I can see that CPanel by design has attempted to answer this question, but the functionality does not seem to work.

    My quest is to put this power into the hands of the user and not have to have some back-end hack that makes me the bad guy as the server owner.

    The Problem
    - Spam Assassign has a feature that allows the user to customize how spam is identified and scored. Great Feature

    - Email Filter has a message rule that allows the user to choose "SpamAssassin Spam Header", "begins with", and then enter "Yes" in the box. Followed with a destination of "Discard" should kill the email all together. Again, Great Feature

    BUT, it does not work. The email filter that is. Spam still shows up in my inbox. Its as though the filter never gets applied.

    Now, I have read all the threads that pose the questions about when these rules get applied, and how I as the server owner can change some backend config file. Not the point. These are features that are in front of the user and they don't seem to work. So, I want to know why. Or better yet, how?

    What do I need to tell my customers about how to make these features, that I provide, work?

    Any insights, especially from the CPanel team, would be appreciated.

    Warmest regards,
    John
     
    #1 stocosoft, Nov 27, 2003
    Last edited: Nov 27, 2003
  2. lyew

    lyew Active Member

    Joined:
    Apr 24, 2003
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    If you're referring to the email filter you set under "options" in Horde/IMP, take note that it will work only when you log in to check your mail through Horde. In other words, the filter is a client-based filter.
     
  3. stocosoft

    stocosoft Active Member

    Joined:
    Nov 14, 2003
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Nope -

    I am referring to the "E-mail Filtering" function that is available from the main menu. It is in the "E-Mail" functions on the main page.

    When you use the "Add Filter" funtion, one of the options is filter based on SpamAssassin Spam Header.
     
  4. lyew

    lyew Active Member

    Joined:
    Apr 24, 2003
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for clarifying. I now know what you mean.

    I have the email filtering set up for Spam Assassin headers in my cPanel account and it is working perfectly. I used to be getting over a hundred spam mails a day, and these days it is down to a single digit.

    A few possibilities to consider:

    1. If the filter isn't turned on, is Spam Assassin registering spam as spam and rewriting the subject line with "****SPAM****"?

    2. If it is, you might want to find out if Spam Assassin is writing the header: X-Spam-Status: Yes ... into the email. Is it possible that your version of spam assassin might be writing different headers with different capitalization?

    3. Check to make sure that email filtering is working at all.

    4. You might want to change the filter to discard messages with the subject line containing "***SPAM***"

    Hope this helps.
     
  5. critter

    critter Well-Known Member

    Joined:
    Nov 19, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Amarillo, Texas
    Going off subject here a little, do you have any sujestions for setting up spam assasin in a way that protects genuine incomming mail?

    I ask because I tried it a while back and re-directed all the caught mail to a fixed address and found that some genuine mail was getting caught, so I had to abandon it, haven't tried it again since, but I have heard a lot of good reports about it, and would like to set it up for a couple of my customers, if I can find some way to eliminate the possibility of losing "real" messages.
     
  6. lyew

    lyew Active Member

    Joined:
    Apr 24, 2003
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    You could try going to spam assassin->spam assassin configuration in your mail settings in cPanel. From there, change the required_hits to a larger number. This is a matter of trial and error to get the right balance between increasing the chances of getting genuinue mail while letting through the acceptable number of spam messages.
     
  7. critter

    critter Well-Known Member

    Joined:
    Nov 19, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Amarillo, Texas
    Thanks Lyew, I'll give it a try
     
  8. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Just a small addition, i have usually found that 10-14 works mostly for all spams ;)

    Just mite help.
     
  9. critter

    critter Well-Known Member

    Joined:
    Nov 19, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Amarillo, Texas
    Thanks, I'd try it but it seems spam assassin is turned off on my account at the moment, I'll let you know how it works when/if I can get my host to turn it on.
     
  10. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Your cpanel skin should allow you to enable / disable the spamassassin easily.

    Which skin you are using ? Perhaps i can help.
     
  11. critter

    critter Well-Known Member

    Joined:
    Nov 19, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Amarillo, Texas
    Using "X" skin in my main account, also tried looking at other skins in some of my other accounts but can't find it. Been looking in the E-mail section as that's where I'm sure I saw it before.
     
  12. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Mail icon (first icon), third last option Spam Assassin, you won't be able to miss it.
     
  13. critter

    critter Well-Known Member

    Joined:
    Nov 19, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Amarillo, Texas
    Mail Manager Main Menu


    Web Mail
    Add/Remove Accounts
    Default Address
    Autoresponders
    E-mail Filtering
    Forwarders
    Trace an E-mail Address
    Modify Mail Exchanger (MX Entry)


    Please tell me it's not there, I don't think I'm blind :D
     
  14. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    strange, probably your service provider removed it from the theme.

    Doesn't make sense though.
     
  15. VincentB

    VincentB Member

    Joined:
    Dec 17, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I've got a little to add to this topic: I am also having the problem of Spam Assasin and the Mail Filter not working together. I tried filtering on the tag that Spam Assasin gives to the spam, but it still ends up in my main mail account.

    I've did some tests, and this is my conclusion: the filter operates *before* Spam Assasin, resulting in the following situation:

    1. Mail is received on the server
    2. Filter checks if the mail is tagged as spam by looking at the subject. It isn't (never is) because now is when Spam Assasin starts working:
    3. Spam Assasin checks if the mail is spam, and adds a tag to the subject if this is the case.

    To me this sounds like a bug in CPanel. Which is weird, because there are reports of people who *did* get this to work.

    Can anyone confirm or dismiss my findings?
     
  16. stocosoft

    stocosoft Active Member

    Joined:
    Nov 14, 2003
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    VincentB,
    That is exzactly what is happening on my server as well. I have ran all the tests, made sure that SA is turned on, made sure that all the headers are being written. Bottom line, the filter appears to run before SA flags the message.

    What I did until this is solved (since I believe it is a bug as well) is set my threshold to 10 and create a filter in Outlook Express to filter on the exact same thing the cPanel filter is looking at. Guess what... it works in OE. So at least most of the SPAM still goes to the trash.

    I just wish it worked as advertised in cPanel so that my hosting clients would get off my back.

    John
     
  17. VincentB

    VincentB Member

    Joined:
    Dec 17, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Good to see I am not the only one with this problem, I hope the CPanel people will fix this.

    Currently I have Spam Assasin placing a tag in the subject. Outlook throws all mail that has this tag directly into the trash. But being able to have my spam delivered to a seperate mail address would be *much* better...
     
  18. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    I did mine a little different. I have mine rewrite the subject line to include the term {Spam?} and then I set a filter for subject includes {Spam?} and set it to discard, and it works wonderfully.
     
  19. lyew

    lyew Active Member

    Joined:
    Apr 24, 2003
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    VicentB, try this test filter.

    Set up a filter to a test email account, such that all mail received on that account will be forwarded to another email on an external server (something like hotmail or yahoo would do fine).

    Then go to that external email and open the forwarded message(s). Read the headers to see if spam assassin has written anything in. If you see spam assassin headings, then you can be certain that spam assassin is working before filter rules are applied. If you don't see the headings, this would be mean that spam assassin is working only after the filtering, which explains the problem you're having.

    For me, spamassassin + filters are working normally.
     
    #19 lyew, Dec 17, 2003
    Last edited: Dec 17, 2003
  20. VincentB

    VincentB Member

    Joined:
    Dec 17, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I did what you told me, and I can now confirm that the filtering takes place *before* Spam Assasin (forwarded mail does not contain Spam Assasin stuff in the header).

    OK, so that explains why I am having this problem. But what I find a little strange is that some CPanel users are having this problem and others aren't. Does this make this problem a bug in CPanel or is it just a case of bad configuration on my server? And if so, what do I have to do to fix this?
     
Loading...

Share This Page