Spam filters not working for me

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

Spam filters not working for me

Postby michael.zietlow » Thu Feb 11, 2021 12:43 pm

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
Elite member
Elite member
Posts: 2226
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 8.8.15 Network Edition
Contact:

Re: Spam filters not working for me

Postby L. Mark Stone » Tue Feb 23, 2021 1:57 am

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/
Zeta Alliance http://www.zetalliance.org/

Return to “Administrators”

Who is online

Users browsing this forum: Bing [Bot] and 20 guests