Author Topic: Install Razor2 for Postfix/Dovecot Spam Filtering along with SpamAssassin  (Read 4279 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
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
Code: [Select]
# yum install pyzor perl-Razor-Agent
Create Razor Home Directory
Code: [Select]
# mkdir /etc/mail/spamassassin/.razor
Enable the Pyzor plugin
Code: [Select]
# 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
Code: [Select]
# razor
use_razor2 1
razor_config /etc/mail/spamassassin/.razor/razor-agent.conf
score RAZOR2_CHECK 3.000

Restart
Code: [Select]
# systemctl restart spamassassin
Discover the Razor
Code: [Select]
# 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
Code: [Select]
#
# 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
Code: [Select]
# spamassassin -t -D razor2 < /usr/share/doc/spamassassin-3.4.0/sample-spam.txt

Check the packages
Code: [Select]
# rpm -qa | grep Razor
# rpm -qa | grep pyzor
# rpm -qa | grep DCC