Topic: Install Pyzor, Razor2 and DCC on your CentOS/RHEL iRedMail Server
==========
Related forum topic: Tutorial for installing Pyzor2, Razor, dcc on Debian/Ubuntu
==========
I've noticed we have a tutorial for installing Pyzor2 and Razor on a Debian based distribution but not CentOS/RHEL, so here it goes
Open the following ports on your firewall
DCC port 6277 UDP
Razor2 port 2307 TCP
Pyzor port 24441 UDP
1. Setup required repositories
DAG Wieers RPMforge has the razor-agents and perl-Razor-Agent packages
For i386:
# rpm -Uvh http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
For x86_64:
# rpm -Uvh http://rpmforge.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
Atomic Rocket Turtle has the latest version of pyzor
# wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh
Note. If you wish to disable the atomic repository after using it, simply edit /etc/yum.repos.d/atomic.repo and change enabled = 1 to enable = 0 in [atomic] section
2. Install the packages
# yum install pyzor razor-agents
3. Perform the following
# chmod -R a+rX /usr/share/doc/pyzor-0.5.0 /usr/bin/pyzor /usr/bin/pyzord
# chmod -R a+rX /usr/lib/python2.4/site-packages/pyzor
# mkdir /var/spool/amavisd
# chown amavis:amavis /var/spool/amavisd
# su -m amavis -c 'pyzor --homedir /var/spool/amavisd discover'
# su -m amavis -c 'razor-admin -home=/var/spool/amavisd -create'
# su -m amavis -c 'razor-admin -home=/var/spool/amavisd -register'
4. Install DCC
# cd /tmp
# wget http://www.dcc-servers.net/dcc/source/dcc-dccproc.tar.Z
# tar xzvf dcc-dccproc.tar.Z
# cd dcc-dccproc-1.3.103
# ./configure --with-uid=amavis
# make
# make install
# chown -R amavis:amavis /var/dcc
# ln -s /var/dcc/libexec/dccifd /usr/local/bin/dccifd
Note. You can ignore the sendmail build error's you see when you run ./configure --with-uid=amavis
5. Modify Spamassassin
Add the following to /etc/mail/spamassassin/local.cf
# dcc
use_dcc 1
dcc_home /var/dcc
dcc_path /usr/local/bin/dccproc
dcc_timeout 10
add_header all DCC _DCCB_: _DCCR_
# pyzor
use_pyzor 1
pyzor_path /usr/bin/pyzor
# razor
use_razor2 1
razor_config /var/spool/amavisd/razor-agent.conf
score RAZOR2_CHECK 2.500
score PYZOR_CHECK 2.500
score DCC_CHECK 4.000
Enable the DCC plugin in /etc/mail/spamassassin/v310.pre
# DCC - perform DCC message checks.
#
# DCC is disabled here because it is not open source. See the DCC
# license for more details.
#
loadplugin Mail::SpamAssassin::Plugin::DCC
Check your Spamassassin configuration
# spamassassin --lint
It shouldn't show any errors.
6. Restart Amavid and test away
# service amavisd restart
testing commands
# spamassassin -t -D razor2 < /usr/share/doc/spamassassin-3.2.5/sample-spam.txt
# spamassassin -t -D pyzor < /usr/share/doc/spamassassin-3.2.5/sample-spam.txt
# cdcc info
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.