Spam filters not working for me

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
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/, /opt/zimbra/conf/, and even tried /opt/zimbra/data/spamassassin/localrules/

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 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

Re: Spam filters not working for me

Postby L. Mark Stone » Tue Feb 23, 2021 1:57 am 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 “” and put your customizations in that file. It will be read and executed last, and never overwritten by the configuration daemon.

Hope that helps,
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner
Zeta Alliance

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 13 guests