Spam filters not working for me

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
michael.zietlow
Posts: 3
Joined: Thu Feb 11, 2021 12:22 pm

Spam filters not working for me

Post by michael.zietlow »

I have a Sophos spam filter that prepends "[SPAM]" in front of the subject line.
I want these messages to be score 10 and moved right into the user's Junk folder.

I created the following rule in /opt/zimbra/conf/salocal.cf, /opt/zimbra/conf/salocal.cf.in, and even tried /opt/zimbra/data/spamassassin/localrules/myrules.cf

header LOCAL_RULE_SPAM_1 Subject =~ /\[SPAM\]/i
describe LOCAL_RULE_SPAM_1 Sophos adds SPAM to subject of highly suspect emails.
score LOCAL_RULE_SPAM_1 10

Yes I restarted
$ zmmtactl restart && zmamavisdctl restart


It just doesn't work. I've been scouring the webs & forums for other zimbra salocal.cf examples and it looks like this should work.

Please, What am I missing?


EDIT: Did the shotgun approach

zmcontrol stop
zmcontrol start


The header filter is correct. Mail going into junk now as intended.
Zimbra had been running non stop for several months so something unrelated must have been holding it up.
User avatar
L. Mark Stone
Ambassador
Ambassador
Posts: 2799
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 10.0.7 Network Edition
Contact:

Re: Spam filters not working for me

Post by L. Mark Stone »

salocal.cf gets rewritten on every service restart by zmconfigd, so your changes get overwritten. This behavior is true of most of the config files.

Better to create a new file, like “zzsauser.cf” and put your customizations in that file. It will be read and executed last, and never overwritten by the configuration daemon.

Hope that helps,
Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
Post Reply