Spam not recognized by Filter

jhobbs

Member
Feb 3, 2003
24
0
151
Sturgis, Michigan
The email filtering in cPanel's 8.8.0-RELEASE 73 shows:
Hint: To filter all mail that SpamAssasin has marked as spam, just choose "SpamAssassin Spam Header", "begins with", and then enter "Yes" in the box.

I've configured SpamAssassin to rewrite the header, and used the above hint plus using the text of the rewritten header, so the filter can delete the spam.

The spam gets moved into NeoMail's SPAM folder. but not deleted. What am I missing?
 

anand

Well-Known Member
Nov 11, 2002
1,432
1
168
India
cPanel Access Level
DataCenter Provider
Originally posted by jhobbs
The email filtering in cPanel's 8.8.0-RELEASE 73 shows:
Hint: To filter all mail that SpamAssasin has marked as spam, just choose "SpamAssassin Spam Header", "begins with", and then enter "Yes" in the box.

I've configured SpamAssassin to rewrite the header, and used the above hint plus using the text of the rewritten header, so the filter can delete the spam.

The spam gets moved into NeoMail's SPAM folder. but not deleted. What am I missing?
Try switching off the SPAM folder option which is available with spamassassin and check.

I usually prefer using spamassassin's option of rewriting the subject by adding "*******SPAM*******" and then using a filter to check is any subject begins with the test, then delete it. Helped me when i used to use it (now i have rbl check and have disabled spamd as it takes lot of cpu resources as we get heavy mail traffic on our boxes).
 

jhobbs

Member
Feb 3, 2003
24
0
151
Sturgis, Michigan
Re: Re: Spam not recognized by Filter

Originally posted by anand
Try switching off the SPAM folder option which is available with spamassassin and check.
Thanks Anand,
I couldn't find this SPAM folder option in cPanel's Spamassassin or Email options. Is there another way?
 

anand

Well-Known Member
Nov 11, 2002
1,432
1
168
India
cPanel Access Level
DataCenter Provider
Re: Re: Re: Spam not recognized by Filter

Originally posted by jhobbs
Thanks Anand,
I couldn't find this SPAM folder option in cPanel's Spamassassin or Email options. Is there another way?
Its inside the user cpanel. Which theme you using ? Check the spamassain page in default / X theme, it should have it. Let me check and revert back on this.
 

anand

Well-Known Member
Nov 11, 2002
1,432
1
168
India
cPanel Access Level
DataCenter Provider
alrite X theme, Mail -> Spam Assassin, Enable Spam Box

Just next to Spam Assassin. Try to switch it off if its turned on.
 

anand

Well-Known Member
Nov 11, 2002
1,432
1
168
India
cPanel Access Level
DataCenter Provider
Originally posted by jhobbs
That was too obvious. Many thanks!
np :D

Surely post here what actually happened. The post might help someone else to solve his probs ;)
 

anand

Well-Known Member
Nov 11, 2002
1,432
1
168
India
cPanel Access Level
DataCenter Provider
Originally posted by jhobbs
Still no joy! Spam is now coming to my mailbox, not going to the spam folder, but it's not being deleted by the filter.
hmm... that is strange.

Btw did you try what i said about using the rewriting the subject and using filter to delete based on subject ??
 

jhobbs

Member
Feb 3, 2003
24
0
151
Sturgis, Michigan
Originally posted by anand
Btw did you try what i said about using the rewriting the subject and using filter to delete based on subject ??
Yes. Spamassassin is adding "JBHSPAM" to the headers.
The filters have

Filter Destination
$h_X-Spam-Status: begins "JBHSPAM" Discard
$h_X-Spam-Status: begins "Yes" Discard
$header_subject: begins "JBHSPAM" Discard
$header_subject: contains "JBHSPAM" Discard

I just added the last one, hoping it would fix something.
The email subject does begin "JBHSPAM" but the delete filters aren't catching it.
 

anand

Well-Known Member
Nov 11, 2002
1,432
1
168
India
cPanel Access Level
DataCenter Provider
Originally posted by jhobbs
Yes. Spamassassin is adding "JBHSPAM" to the headers.
The filters have

Filter Destination
$h_X-Spam-Status: begins "JBHSPAM" Discard
$h_X-Spam-Status: begins "Yes" Discard
$header_subject: begins "JBHSPAM" Discard
$header_subject: contains "JBHSPAM" Discard

I just added the last one, hoping it would fix something.
The email subject does begin "JBHSPAM" but the delete filters aren't catching it.
Ok do this in shell.

mail -v [email protected]
Subject: JBHSPAM Something now
test
.

And see what happens, does this mail get deliver ?

Try to open the /etc/vfilters/domain.com and see if the filters are present there.
 

jhobbs

Member
Feb 3, 2003
24
0
151
Sturgis, Michigan
Originally posted by anand
Ok do this in shell.

mail -v [email protected]
Subject: JBHSPAM Something now
test
.

And see what happens, does this mail get deliver ?

Try to open the /etc/vfilters/domain.com and see if the filters are present there.
Unfortunately, I'm on a VDS and mail is apparently stripped. I tried using pine, but got an abort error message when sending.
I sent the message using Outlook, cc'd to another email, and the filter worked. So, it appears SpamAssassin is changing the subject, and the filters catch the email when sent from outside, but the filters don't work after SpamAssassin has modified the header.

The folder you mentioned contains the file with the filter text.