SpamAssassin

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
zgokan
Advanced member
Advanced member
Posts: 98
Joined: Sun Apr 17, 2016 8:58 am

SpamAssassin

Postby zgokan » Sun Jan 07, 2018 7:52 pm

Hello

Is there a SpamAssassin (zimbra default) DNSEval plugin ?

Thanks.


User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 320
Joined: Fri Sep 12, 2014 11:18 pm
Location: Victoria, BC
ZCS/ZD Version: Release 8.7.11_GA_1854.RHEL6_64.P7
Contact:

Re: SpamAssassin

Postby JDunphy » Tue Jan 09, 2018 3:50 pm

Code: Select all

relay3:SpamAssassin/Plugin:44> pwd
/opt/zimbra/common/lib/perl5/Mail/SpamAssassin/Plugin
relay3:SpamAssassin/Plugin:43> ls DNSEval.pm
DNSEval.pm
zgokan
Advanced member
Advanced member
Posts: 98
Joined: Sun Apr 17, 2016 8:58 am

Re: SpamAssassin

Postby zgokan » Wed Jan 10, 2018 10:16 pm

very thanks...

I wrote an RBL control as follows. But it does not work. What can be the problem ?

# vi /opt/zimbra/conf/salocal.cf.in

Code: Select all

skip_rbl_checks 0
##{ RCVD_IN_RBLM_SPAMIP ifplugin Mail::SpamAssassin::Plugin::DNSEval
ifplugin Mail::SpamAssassin::Plugin::DNSEval

header RCVD_IN_RBLM_SPAMIP       eval:check_rbl('rbl-lastexternal','b.barracudacentral.org','cbl.abuseat.org')
describe RCVD_IN_RBLM_SPAMIP     OB RBL KONTROL
tflags RCVD_IN_RBLM_SPAMIP       net noautolearn

endif



Thanks.
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 320
Joined: Fri Sep 12, 2014 11:18 pm
Location: Victoria, BC
ZCS/ZD Version: Release 8.7.11_GA_1854.RHEL6_64.P7
Contact:

Re: SpamAssassin

Postby JDunphy » Wed Jan 10, 2018 10:25 pm

Make sure your modifying /opt/zimbra/data/spamassassin/localrules/sauser.cf and then do a zmantispamctl restart
zgokan
Advanced member
Advanced member
Posts: 98
Joined: Sun Apr 17, 2016 8:58 am

Re: SpamAssassin

Postby zgokan » Thu Jan 11, 2018 2:33 pm

Hello

A file with that name does not appear.


Code: Select all

-rw-r--r-- 1 zimbra zimbra   1289 Dec 19  2015 init.pre
-rw-r--r-- 1 zimbra zimbra   2379 Dec 19  2015 local.cf
drwx------ 2 zimbra zimbra   4096 Jan 11 00:45 sa-update-keys
-rw-r----- 1 zimbra zimbra 300704 Dec 13 19:06 sakam.cf
-r--r----- 1 zimbra zimbra   5820 Jan 11 03:34 salocal.cf
-rw-r--r-- 1 zimbra zimbra   2523 Dec 19  2015 v310.pre
-rw-r--r-- 1 zimbra zimbra   1194 Dec 19  2015 v312.pre
-rw-r--r-- 1 zimbra zimbra   2414 Dec 19  2015 v320.pre
-rw-r--r-- 1 zimbra zimbra   1237 Dec 19  2015 v330.pre
-rw-r--r-- 1 zimbra zimbra   1020 Dec 19  2015 v340.pre
-rw-r--r-- 1 zimbra zimbra   1309 Dec 19  2015 v341.pre


Code: Select all

[zimbra@mail ~]$ zmcontrol -v
Release 8.7.0_GA_1659.RHEL7_64_20160628202714 RHEL7_64 FOSS edition.
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 320
Joined: Fri Sep 12, 2014 11:18 pm
Location: Victoria, BC
ZCS/ZD Version: Release 8.7.11_GA_1854.RHEL6_64.P7
Contact:

Re: SpamAssassin

Postby JDunphy » Thu Jan 11, 2018 2:54 pm

zgokan wrote:Hello

A file with that name does not appear.



And there you have it.

You can test your environment like this before putting rules into production.

copy spam or mail into a file... say /tmp/j.mail then do this.

Code: Select all

su - zimbra
spamassassin -D < /tmp/j.mail > /dev/null 2> /tmp/3.output


look inside /tmp/3.output to see which rules fired and if your new rules are working.

If you don't need to do network lookups (ie. rbl's), then add the -L option to the command above. If you just want to verify your syntax do:

Code: Select all

su - zimbra
/opt/zimbra/common/bin/spamassassin --lint


So the cycle is:

0) write rules
1) lint
2) debug
3) zmantispamctl restart only after you have your rules working

Return to “Administrators”

Who is online

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