Skip to main content

How to Install Razor/Razor2 on CentOS Web Panel for Postfix/Dovecot ?

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
Razor Test
# spamassassin -t -D razor2 < /usr/share/doc/spamassassin-3.4.0/sample-spam.txt
Check the packages 
# rpm -qa | grep Razor
# rpm -qa | grep pyzor
# rpm -qa | grep DCC
Sourceforge Link:
http://razor.sourceforge.net/download/
https://sourceforge.net/projects/razor/

Comments