Rspamd: A replacement for Spamassassin & Postscreen

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
disabler
Posts: 3
Joined: Sat Nov 10, 2018 10:24 am

Re: Rspamd: A replacement for Spamassassin & Postscreen

Postby disabler » Sat Nov 10, 2018 10:45 am

Hello everybody!

All you need to configure Zimbra, instead of editing postfix config after restarts and upgrades:

Code: Select all

zmprov ms `zmhostname` zimbraMtaMilterDefaultAction accept
zmprov ms `zmhostname` zimbraMtaSmtpdMilters ""
zmprov ms `zmhostname` zimbraMilterServerEnabled TRUE
zmprov ms `zmhostname` zimbraMilterBindPort 11332
zmprov ms `zmhostname` -zimbraServiceEnabled antispam
zmantispamctl stop


Then wait until zimbra populates it's config and check if everything is ok:

Code: Select all

postconf | grep "smtpd_milters\|default_action"


phoenix
Ambassador
Ambassador
Posts: 25816
Joined: Fri Sep 12, 2014 9:56 pm

Re: Rspamd: A replacement for Spamassassin & Postscreen

Postby phoenix » Sat Nov 10, 2018 11:22 am

Thanks for your tip, I'll update the wiki article later. :) Are you using rspamd and, if so, how do you find it?
Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168
disabler
Posts: 3
Joined: Sat Nov 10, 2018 10:24 am

Re: Rspamd: A replacement for Spamassassin & Postscreen

Postby disabler » Sat Nov 10, 2018 11:45 am

I've just installed it, so can't provide any feedback, but have a question: I want to train rspamd with raw text, but always get err 404 "has been already learned as spam, ignore it". What am I doing wrong?
phoenix
Ambassador
Ambassador
Posts: 25816
Joined: Fri Sep 12, 2014 9:56 pm

Re: Rspamd: A replacement for Spamassassin & Postscreen

Postby phoenix » Sat Nov 10, 2018 2:04 pm

Are you putting that in the Web UI? If that's the case it usually means what it says and the email has been seen as spam prior to you entering it, unless you know different. :)
Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168
phoenix
Ambassador
Ambassador
Posts: 25816
Joined: Fri Sep 12, 2014 9:56 pm

Re: Rspamd: A replacement for Spamassassin & Postscreen

Postby phoenix » Sat Nov 10, 2018 2:17 pm

disabler wrote:Hello everybody!

All you need to configure Zimbra, instead of editing postfix config after restarts and upgrades:

Code: Select all

zmprov ms `zmhostname` zimbraMtaMilterDefaultAction accept
zmprov ms `zmhostname` zimbraMtaSmtpdMilters ""
zmprov ms `zmhostname` zimbraMilterServerEnabled TRUE
zmprov ms `zmhostname` zimbraMilterBindPort 11332
zmprov ms `zmhostname` -zimbraServiceEnabled antispam
zmantispamctl stop


Then wait until zimbra populates it's config and check if everything is ok:

Code: Select all

postconf | grep "smtpd_milters\|default_action"
The only drawback I can see to those zmprov changes (after a couple of tests) is that the inbuilt ZCS milter is no longer available. I prefer to leave ZCS as close to it's original state as possible and the following works for me and if anyone has any input on whether this affects the ZCS milter I like to hear it. :)

Code: Select all

su - zimbra
zmprov ms $(zmhostname) zimbraMilterServerEnabled TRUE
zmprov ms $(zmhostname) zimbraMtaMilterDefaultAction accept
zmprov ms $(zmhostname) zimbraMtaSmtpdMilters: smtpd_milters=inet:localhost:11332


Then just make this change as the zimbra user:

Code: Select all

postconf smtpd_milters=inet:localhost:11332
At least there's no longer any modifications to the config files, I must have missed that in recent versions of postfix the "milter_mail_macros" & "milter_protocol" entries no longer needed to be defined in the config file. Thanks again for post this tip.
Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168
phoenix
Ambassador
Ambassador
Posts: 25816
Joined: Fri Sep 12, 2014 9:56 pm

Re: Rspamd: A replacement for Spamassassin & Postscreen

Postby phoenix » Sat Nov 10, 2018 2:24 pm

lowhigh wrote:
phoenix wrote:You can have it listen on any IP address your like if you modify the /etc/rspamd/local.d/worker-controller.inc file (that's the file that has the web ui passwords in it ), just use the following:

Code: Select all

bind_socket = "*:11334";
That obviously listens on all configured IP addresses but you can restrict it by specifying a single IP.

BTW, there are lots of examples of configurations for rspamd on the internet. Here's one that's quite useful and has plenty of good examples: https://roll.urown.net/server/mail/rspamd.html

Wow, very very excited. I have done and applied for one of our Production Servers. Everything seem to be fine but i have one more question: How to back Rspamd to Spamasassin in Zimbra. I need a backup plan for upgrading all my Production Servers

Thanks phoenix!
Sorry about the late reply, I missed this post. Do you mean you want to revert to Spamassassin? If you want to do that just revert the changes you made to install rspamd or just reinstall the original copies of the files (you did backup the config files first, didn't you?) .
Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168
phoenix
Ambassador
Ambassador
Posts: 25816
Joined: Fri Sep 12, 2014 9:56 pm

Re: Rspamd: A replacement for Spamassassin & Postscreen

Postby phoenix » Sat Nov 10, 2018 5:02 pm

For anyone that has a current installation of rspamd there have been some changes to the documentation on the wiki and in the first post of this thread. Thanks to @disabler a couple of posts above this, there is now the possibility all but one command survive upgrades, take a lok at the documentation and you''ll see that we no longer need to modify any ZCS config files, and only need to replace the zmtrainsa script and run one postconf command after an upgrade, a much more neat install. :)
Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168
disabler
Posts: 3
Joined: Sat Nov 10, 2018 10:24 am

Re: Rspamd: A replacement for Spamassassin & Postscreen

Postby disabler » Sun Nov 11, 2018 12:05 pm

phoenix wrote:Are you putting that in the Web UI? If that's the case it usually means what it says and the email has been seen as spam prior to you entering it, unless you know different. :)

I have tried both webui and cli (rspamc learn_spam < spam.txt) with absolutely new raw texts as ham/spam... always 404
Anyway, modified zmtrainsa script works perfectly!

Thank you for your work!

upd. Just found greylisted message and feed it to ham learn window -> success
lowhigh
Posts: 34
Joined: Wed Feb 08, 2017 5:14 pm

Re: Rspamd: A replacement for Spamassassin & Postscreen

Postby lowhigh » Tue Nov 13, 2018 4:40 pm

phoenix wrote:
lowhigh wrote:
phoenix wrote:You can have it listen on any IP address your like if you modify the /etc/rspamd/local.d/worker-controller.inc file (that's the file that has the web ui passwords in it ), just use the following:

Code: Select all

bind_socket = "*:11334";
That obviously listens on all configured IP addresses but you can restrict it by specifying a single IP.

BTW, there are lots of examples of configurations for rspamd on the internet. Here's one that's quite useful and has plenty of good examples: https://roll.urown.net/server/mail/rspamd.html

Wow, very very excited. I have done and applied for one of our Production Servers. Everything seem to be fine but i have one more question: How to back Rspamd to Spamasassin in Zimbra. I need a backup plan for upgrading all my Production Servers

Thanks phoenix!
Sorry about the late reply, I missed this post. Do you mean you want to revert to Spamassassin? If you want to do that just revert the changes you made to install rspamd or just reinstall the original copies of the files (you did backup the config files first, didn't you?) .

Thanks phoenix so much!
phoenix
Ambassador
Ambassador
Posts: 25816
Joined: Fri Sep 12, 2014 9:56 pm

Re: Rspamd: A replacement for Spamassassin & Postscreen

Postby phoenix » Tue Nov 13, 2018 4:46 pm

lowhigh wrote:Thanks phoenix so much!
You're welcome and I hope it all goes well for you, let's us know how you get on once it's all in place.
Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 24 guests