Using the CPanel Filter and Spam Assassin

stocosoft

Active Member
Nov 14, 2003
32
0
156
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
 
Last edited:

lyew

Active Member
Apr 24, 2003
38
0
156
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.
 

stocosoft

Active Member
Nov 14, 2003
32
0
156
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.
 

lyew

Active Member
Apr 24, 2003
38
0
156
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.
 

critter

Well-Known Member
Nov 19, 2003
59
0
156
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.
 

lyew

Active Member
Apr 24, 2003
38
0
156
Originally posted by critter
Going off subject here a little, do you have any sujestions for setting up spam assasin in a way that protects genuine incomming mail?
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.
 

anand

Well-Known Member
Nov 11, 2002
1,432
1
168
India
cPanel Access Level
DataCenter Provider
Originally posted by critter
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.
Your cpanel skin should allow you to enable / disable the spamassassin easily.

Which skin you are using ? Perhaps i can help.
 

anand

Well-Known Member
Nov 11, 2002
1,432
1
168
India
cPanel Access Level
DataCenter Provider
Originally posted by critter
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.
Mail icon (first icon), third last option Spam Assassin, you won't be able to miss it.
 

VincentB

Member
Dec 17, 2003
14
0
151
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?
 

stocosoft

Active Member
Nov 14, 2003
32
0
156
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
 

VincentB

Member
Dec 17, 2003
14
0
151
Originally posted by stocosoft
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
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...
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,774
328
363
Chesapeake, 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.
 

lyew

Active Member
Apr 24, 2003
38
0
156
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.
 
Last edited:

VincentB

Member
Dec 17, 2003
14
0
151
Originally posted by lyew
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.
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?