Control Web Panel
WebPanel => E-Mail => Topic started by: DNA on March 05, 2020, 11:26:02 AM
-
Vipul's Razor is a distributed, collaborative, spam detection and filtering network. The primary focus of the system is to identify and disable an email spam before its injection and processing is complete.
Open the following port in your firewall:
TCP 2703 Outgoing : Razor2
Razor Installation
# yum install pyzor perl-Razor-Agent
Create Razor Home Directory
# mkdir /etc/mail/spamassassin/.razor
Enable the Pyzor plugin
# vi /etc/mail/spamassassin/v310.pre
# Razor2 - perform Razor2 message checks.
#
loadplugin Mail::SpamAssassin::Plugin::Razor2
Add the following to /etc/mail/spamassassin/local.cf
# razor
use_razor2 1
razor_config /etc/mail/spamassassin/.razor/razor-agent.conf
score RAZOR2_CHECK 3.000
Restart
# systemctl restart spamassassin
Discover the Razor
# razor-admin -home=/etc/mail/spamassassin/.razor -register
# razor-admin -home=/etc/mail/spamassassin/.razor -create
# razor-admin -home=/etc/mail/spamassassin/.razor -discover
Define Home Directory, Edit /etc/mail/spamassassin/.razor/razor-agent.conf
#
# Razor2 config file
#
# Autogenerated by Razor-Agents v2.84
# Sat Feb 29 22:19:37 2020
# Non-default values taken from /etc/mail/spamassassin/.razor/razor-agent.conf
#
# see razor-agent.conf(5) man page
#
debuglevel = 3
identity = identity
ignorelist = 0
listfile_catalogue = servers.catalogue.lst
listfile_discovery = servers.discovery.lst
listfile_nomination = servers.nomination.lst
logfile = razor-agent.log
logic_method = 4
min_cf = ac
razordiscovery = discovery.razor.cloudmark.com
razorhome = /etc/mail/spamassassin/.razor
rediscovery_wait = 172800
report_headers = 1
turn_off_discovery = 0
use_engines = 4,8
whitelist = razor-whitelist
Test
# spamassassin -t -D razor2 < /usr/share/doc/spamassassin-3.4.0/sample-spam.txt(https://1.bp.blogspot.com/-e0r1q27Z4Q0/Xl6KFlKhc_I/AAAAAAAAFm0/Ui0icTE9j2o4WvKUNFjB2SpPcoZ6ytgTwCEwYBhgL/s1600/razor2.png)
Check the packages
# rpm -qa | grep Razor
# rpm -qa | grep pyzor
# rpm -qa | grep DCC
-
An update on this, since I noticed SpamAssassin's status shows a Razor error on the default CWP install. Plus, many users are crying out due to the deluge of spam they are facing. So I gave these instructions a whirl. Just a few updates to note:
With AlmaLinux 8, you only need to install pyzor:
dnf install pyzorAdd 2703 to TCP_OUT in /etc/csf/csf.conf, then issue csf -r to restart the firewall.
You don't need to enable the Pyzor plugin in /etc/mail/spamassassin/v310.pre -- it is already enabled.
The only other change in the directions is that you should create the razor-agent.conf file BEFORE restarting SpamAssassin
/etc/mail/spamassassin/.razor/razor-agent.conf
To test Razor with the GTUBE (Generic Test for Unsolicited Bulk Email) test:
spamassassin -t -D razor2 < /usr/share/doc/spamassassin/sample-spam.txt