Spam not going to spam folder

ljweb

Verified User
Joined
Mar 31, 2005
Messages
53
For some reason i cant get emails tagged as spam by spamassassin to be stored in either the users spam folder or the catch-all spam folder. I've tried recreating the email account and also reinstalling spamassassin with no luck.
Also the spam word filters wont work. This is all happening on one account only, other accounts on the same server are placing spam in the spam folder and following the filtering rules.

Is there anything else i should be checking to get this working?
 
Can you check the permission of /home/user/.spamassassin/user_spam folder?
 
Yes, its 771 . And the user spam files are 660 which seem correct.

Thanks.
 
It seems to work every now and then but not constantly, maybe about 20% of emails tagged as spam are actually going in the spam folder, so its sort of working but not fully working ?..
 
OK, i've really persisted with this issue and have discovered the following.

I was originally trying to filter out hundreds of bounced back emails, someone has used this particular address as a reply-to address in a bulk spam email campaign. The bounced back email contained the original spam email and therefore was recognised as spam but not actually going to the spam folder as directed.

I checked permissions, recreated email account, even moved to another directadmin server and still couldnt get those bounced spams ending up in the spam folder.

I then started fiddling with the filter file in /etc/virtual/www.domain.com/ . After a while i discovered if i placed the : if $h_X-Spam-Status: contains "Yes," ... section BEFORE "if error_message then finish endif" then spam would then be transferred to the spam folder.

So it seems that a bounced email is seen by exim as some sort of error message and is then ending the filter routine.

I've noticed i can change the order of the filter permanently by editing /usr/local/directadmin/data/templates/filter_base and move the 'if error_message then finish endif' to the end. Would there be any major issue in doing this?
 
Last edited:
The only issue is that an update to DA could revert back to the original template.

To keep that from happening move the template to the ./custom directory, and modify it there.

Jeff
 
Back
Top