sauser.cf missing in localrules

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
BharathS
Advanced member
Advanced member
Posts: 52
Joined: Wed Nov 26, 2014 12:42 am

sauser.cf missing in localrules

Post by BharathS »

Hi Team,

I'm on the verge of getting spamassassin to work, recently migrated from 8.6.0 to 8.8.8, I don't remember if the sauser.cf was present in the past, but now when I refer to zimbra Anti-spam strategies it says there should be a file called sauser.cf at "/opt/zimbra/data/spamassassin/localrules" no such file is present but I do see salocal.cf, does this mean my spamassassin is broken? how to configure this back?

Edit: antispam rule is also in false state.
zimbra@zimbra:~/data/spamassassin/localrules$ zmlocalconfig antispam_enable_rule_updates
antispam_enable_rule_updates = false
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 897
Joined: Fri Sep 12, 2014 11:18 pm
Location: Victoria, BC
ZCS/ZD Version: 9.0.0_P39 NETWORK Edition

Re: sauser.cf missing in localrules

Post by JDunphy »

BharathS wrote:Hi Team,

I'm on the verge of getting spamassassin to work, recently migrated from 8.6.0 to 8.8.8, I don't remember if the sauser.cf was present in the past, but now when I refer to zimbra Anti-spam strategies it says there should be a file called sauser.cf at "/opt/zimbra/data/spamassassin/localrules" no such file is present but I do see salocal.cf, does this mean my spamassassin is broken? how to configure this back?
If you see these headers in your email, it is probably already working.

Code: Select all

X-Virus-Scanned: amavisd-new at example.com
X-Spam-Flag: NO
X-Spam-Score: -5.176
X-Spam-Level:
X-Spam-Status: No, score=-5.176 required=5.0 tests=[BAYES_05=-0.5,
	DKIMWL_WL_HIGH=-0.223, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HTML_IMAGE_ONLY_20=1.546, HTML_MESSAGE=0.001,
	HTTP_IN_BODY=0.1, J_DANGEROUS_TAGS=0.1, J_RCVD_IN_HOSTKARMA_W=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5]
	autolearn=ham autolearn_force=no
Where the X-Spam-Status line indicate the rule that fired and the score that was applied to it. By default, anything over 5 is moved to junk and anything over 15 is not delivered to the users email account.

If you are going to make local changes then you would do them at sauser.cf

I can't remember which upgrade moved localrules to /opt/zimbra/data/spamassassin/localrules/sauser.cf ... If it doesn't exist, you would create it and put your own local rules here. If you previously had some localrules, then move them to this new location to get started.

SA is fairly easy to extend and modify. Search these forums for more information with testing, or building new rules. There is a ton of documentation outside of zimbra for 3rd party rules and examples how to use them. You can also install additional plugins and install them in: /opt/zimbra/common/lib/perl5/Mail/SpamAssassin/Plugin and then enabling them via your sauser.cf. You might also benefit from changing the scores of existing rules to provide a more optimized solution for your type of incoming spam. The zimbra SA solution is fairly stock solution so most of the external documentation for SA, amavisd, and postfix could provide additional sources of howto if you feel what you are finding here is lacking.

Note: with any change to SA, test your rules (-D) and lint them against actual email from the command line before you perform "zmantispamctl restart" and using those new rules/scores/plugins in production.
If you have a lot of business email, you will most likely need some custom rules since mailchimp, sendgrid, etc provide testing interfaces against various spam detection systems/rules including SA and will slip past those defenses.
BharathS
Advanced member
Advanced member
Posts: 52
Joined: Wed Nov 26, 2014 12:42 am

Re: sauser.cf missing in localrules

Post by BharathS »

Thank you!, looks like my antivirus is working, I do see the status is similar to the one you attached. Thanks again!
Post Reply