Rspamd: Fast, free and open-source spam filtering system

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
bunny
Posts: 27
Joined: Sat Sep 13, 2014 1:48 am

Re: Rspamd: A replacement for Spamassassin & Postscreen

Post by bunny »

Hello Sir,

I am in the process of installing Zimbra (8.7.7) with MailScanner in a new server and then I have to migrate all mailboxes from old zimbra server (8.0.7) to this newly setup server. In present server we are completely dependent on customized SPAM scores and RBLs. While configuring Mailscanner I came across your post reg. Rspamd. We are totally dependent on open source for spam control as we do not have any commercial mail Gateways. So, I request you to suggest me which one out of mailscanner and Rspamd is effective in controlling Spam.

Thanks & Regards
phoenix
Ambassador
Ambassador
Posts: 27262
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Rspamd: A replacement for Spamassassin & Postscreen

Post by phoenix »

bunny wrote:I am in the process of installing Zimbra (8.7.7) with MailScanner in a new server and then I have to migrate all mailboxes from old zimbra server (8.0.7) to this newly setup server. In present server we are completely dependent on customized SPAM scores and RBLs. While configuring Mailscanner I came across your post reg. Rspamd. We are totally dependent on open source for spam control as we do not have any commercial mail Gateways. So, I request you to suggest me which one out of mailscanner and Rspamd is effective in controlling Spam.
That depends what you're trying to achieve and what your mail configuration is likely to be. For me the problem with mailscanner is that it requires a separate server i.e. a mail gateway and that it uses SpamAssassin (written in perl, not necessarily a bad thing but not the most performant) which I was trying to move away from by installing Rspamd.

If you use a single ZCS server then rspamd is trivial to install and test and you can always go back to using the standard ZCS installed packages just by reverting the changes that I detail in the first post. If you want my advice then it would be easiest to test Rspamd to see how it performs but the proviso is that you should backup all the configuration files before you modify anything - it's less effort to do that rather than installing an email gateway such as Mailscanner. If you don't like rspamd or it doesn't meet your expectations then you can always remove it and choose another solution.

I do think that Mailscanner is a good product that's been around for a while and provides a solution to some of the spam problems, I did test it some years ago but it doesn't suit my environment and didn't offer anything more than ZCS already provided so I stopped using it.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
bunny
Posts: 27
Joined: Sat Sep 13, 2014 1:48 am

Re: Rspamd: A replacement for Spamassassin & Postscreen

Post by bunny »

Hello Sir,

Thank you for your immediate response. As per your suggestion, I will go for Rspamd.

As it was mentioned in your reply, we are using single server with a backup server in which we take hourly online incremental backups using zmbkpose which is not not actually not much efficient as it does not backup with exact status/location of the newly received mails, i.e, it moves to backup server as new message in inbox and not as read (if already read / moved to another folder). May I request you to kindly suggest for any open source online backup tool for zimbra.


Thanks & Regards,
phoenix
Ambassador
Ambassador
Posts: 27262
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Rspamd: A replacement for Spamassassin & Postscreen

Post by phoenix »

I don't use any of the backup scripts I have ZeXtras tools on my ZCS open source server but you can take a look at some of the backup tools on this page: https://wiki.zimbra.com/wiki/Backup_and ... e_Articles - you should also make sure that the Backup/Restore procedure is fully documented and tested before you ever need to use it, that should ensure you can recover a server in the case of a disastrous failure.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
bunny
Posts: 27
Joined: Sat Sep 13, 2014 1:48 am

Re: Rspamd: A replacement for Spamassassin & Postscreen

Post by bunny »

Hello Sir,

Following the documentation provided by you, I have installed rspamd, redis and also made changes in various configuration files. Finally, when I tried to make rspamd service start, it is throwing the following error:

Starting rspamd: 2017-12-04 16:43:43 #59954(main) cfg; rspamd_config_read: cannot stat /etc/rspamd/rspamd.sysvinit.conf: No such file or directory

I have googled for the error, but I did not find such error occurred with any one. Kindly help me in resolving this issue.

Thanks & Regards,
phoenix
Ambassador
Ambassador
Posts: 27262
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Rspamd: A replacement for Spamassassin & Postscreen

Post by phoenix »

bunny wrote:I have googled for the error, but I did not find such error occurred with any one. Kindly help me in resolving this issue.
An internet search gets you the answer (there's even an answer in this thread): https://www.startpage.com/do/dsearch?qu ... ge=english
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
bunny
Posts: 27
Joined: Sat Sep 13, 2014 1:48 am

Re: Rspamd: A replacement for Spamassassin & Postscreen

Post by bunny »

Hello Sir,

Thanks very much. I could start the service. I will proceed further. Thank you once again.

Regards,
phoenix
Ambassador
Ambassador
Posts: 27262
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Rspamd: A replacement for Spamassassin & Postscreen

Post by phoenix »

bunny wrote:Thanks very much. I could start the service. I will proceed further. Thank you once again.
You're welcome - I hope it works well for you and don't forget to vote on the bug reports and add your comments after your testing. :)
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
bunny
Posts: 27
Joined: Sat Sep 13, 2014 1:48 am

Re: Rspamd: A replacement for Spamassassin & Postscreen

Post by bunny »

Hello Sir,

With initial documentation I could install and configure Rspamd. While going through the thread and verifying my configuration, I found a post by MisterM75 where he mentioned that milter_default_action = accept is changing to milter_default_action=tempfail. When observed, it even happened to me.
Here I observed that the file “/opt/zimbra/common/conf/main.cf “, it has three entries(one in comment) of milter_default_action=tempfail. Third entry which was set to accept was changing to tempfail after postfix restart. Deletion of one entry didn’t resolve the issue. So, as suggested by MisterM75 I deleted the following line in /opt/zimbra/conf/zmconfigd.cf
POSTCONF milter_default_action VAR zimbraMtaMilterDefaultAction
Now, it remains accept even after postfix restart.

Since it is not in production, I manually ran zmtrainsa script for two users and noticed that is has learnt. Following is the output of the run
20171206111403 List rspam stats after training.

Code: Select all

Results for command: stat (0.001 seconds)
Messages scanned: 0
Messages learned: 41
Connections count: 0
Control connections count: 162
Pools allocated: 180
Pools freed: 162
Bytes allocated: 542k
Memory chunks allocated: 41
Shared chunks allocated: 10
Chunks freed: 0
Oversized chunks: 96
Statfile: BAYES_SPAM type: sqlite3; length: 1.94M; free blocks: 0; total blocks: 26.53k; free: 0.00%; learned: 41; users: 1; languages: 1
Statfile: BAYES_HAM type: sqlite3; length: 9.22k; free blocks: 0; total blocks: 0; free: 0.00%; learned: 0; users: 1; languages: 1
Total learns: 41

20171206111403 Finished rspamd training.
20171206111411 Starting spam/ham cleanup
[] INFO: Total messages processed: 0
[] INFO: Total messages processed: 0
20171206111415 Finished spam/ham cleanup
In addition to the above configuration, I have also
Enforced a rule to match between From Address and sasl username
Configured rate limiting
Configured generally available smtpd_restrictions


Now Sir, with the above result which is clear, as our server has around 500 mailboxes, I still have some questions…………
1. I am unable to check the mail headers as it is not publically made available. Can I take it into production mode.?
2. Does Rspamd gets updated periodically for new rules or is it static? In present server, we have stopped updated of spamassassin and customised spamassassin rules that are working fine with our environment. Should I carry forward them to this new server.

Thanks & Regards,
phoenix
Ambassador
Ambassador
Posts: 27262
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Rspamd: A replacement for Spamassassin & Postscreen

Post by phoenix »

bunny wrote:With initial documentation I could install and configure Rspamd. While going through the thread and verifying my configuration, I found a post by MisterM75 where he mentioned that milter_default_action = accept is changing to milter_default_action=tempfail. When observed, it even happened to me.
Here I observed that the file “/opt/zimbra/common/conf/main.cf “, it has three entries(one in comment) of milter_default_action=tempfail. Third entry which was set to accept was changing to tempfail after postfix restart. Deletion of one entry didn’t resolve the issue. So, as suggested by MisterM75 I deleted the following line in /opt/zimbra/conf/zmconfigd.cf
POSTCONF milter_default_action VAR zimbraMtaMilterDefaultAction
Now, it remains accept even after postfix restart.
Thanks, I've modified the initial post and the wiki article to make that step more clear.
bunny wrote:Now Sir, with the above result which is clear, as our server has around 500 mailboxes, I still have some questions…………
1. I am unable to check the mail headers as it is not publically made available. Can I take it into production mode.?
I don't see why you couldn't take it into production but ultimately that is your decision. :)
bunny wrote:2. Does Rspamd gets updated periodically for new rules or is it static? In present server, we have stopped updated of spamassassin and customised spamassassin rules that are working fine with our environment. Should I carry forward them to this new server.
Rspamd does get updated when the developer decides that the latest developments are ready for release. As for the SpamAssassin question, again that's a question that only you can answer. If it were me, I'd disable spamassassin and let rspamd handle your anti-spam and see how you get on and what effect that has (if any) on your spam rates and you can always tweak rspamd later if you have problems.

Good luck and let us know how you get on. :)

BTW, there are a couple of resources below that you might find useful for questions/answers and the issues/Documentation sections on github:

https://lists.rspamd.com/mailman/listinfo
https://github.com/vstakhov/rspamd
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
Post Reply