DCC+razor2+pyzor setup?

kunal

Verified User
Joined
Nov 16, 2005
Messages
23
Hi - can anyone help me setup DCC+razor2+pyor for exim in directadmin?

I have searched online, this forum, everywhere fr steps to follow, but i am a bit lost.

any help would be great!

thanks,
kunal
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,796
Location
LT, EU
To enable DCC:
1. Execute:
Code:
wget http://www.dcc-servers.net/dcc/source/dcc-dccproc.tar.Z
tar xzvf dcc-dccproc.tar.Z
cd dcc-dccproc-*
./configure \
            --bindir=$(PREFIX)/bin \
            --libexecdir=$(PREFIX)/lib/dcc \
            --mandir=$(PREFIX)/man \
            --homedir=/var/lib/dcc \
            --with-uid=mail \
            --with-gid=mail
make
make install
chown -R mail:mail /var/lib/dcc
2. Modify /etc/mail/spamassassin/local.cf, add:
Code:
# dcc
use_dcc 1
dcc_home /var/lib/dcc
dcc_path /usr/bin/dccproc
dcc_timeout     10
add_header all  DCC _DCCB_: _DCCR_
score DCC_CHECK 4.000
3. Modify /etc/mail/spamassassin/v310.pre, add:
Code:
loadplugin Mail::SpamAssassin::Plugin::DCC
4. Open UDP_OUT port 6277 in firewall.

To install Razor/Pyzor:
1. Execute the following to install razor-agents:
Code:
cd /root
wget -O razor-agents-2.82.tar.bz2 http://www.pccc.com/downloads/SpamAssassin/razor-agents-2.82.tar.bz2
tar xjf razor-agents-2.82.tar.bz2
cd razor-agents-2.82
perl Makefile.PL
make
make install
2. Execute the following to install pyzor:
Code:
cd /rootwget -O pyzor-1.0.0.tar.gz "https://pypi.python.org/packages/source/p/pyzor/pyzor-1.0.0.tar.gz#md5=e77b1cd0afd3884e6f2aa585cb423b46"
tar xzf pyzor-1.0.0.tar.gz
cd pyzor-1.0.0
python setup.py build
python setup.py install
3. Open UDP/TCP IN and OUT port 24441 in firewall, open TCP_OUT 2703.

4. Configure razor:
Code:
mkdir /etc/mail/spamassassin/.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
chown -R mail:mail /etc/mail/spamassassin/.razor
5. Add the following to /etc/mail/spamassassin/local.cf:
Code:
# pyzor
use_pyzor 1
pyzor_path /usr/bin/pyzor
score PYZOR_CHECK 3.000
# razor
use_razor2 1
razor_config /etc/mail/spamassassin/.razor/razor-agent.conf
score RAZOR2_CHECK 3.000
6. Add to /etc/mail/spamassassin/.razor/razor-agent.conf:
Code:
razorhome = /etc/mail/spamassassin/.razor
7. Add the following path to /etc/logrotate.d/exim:
Code:
/etc/mail/spamassassin/.razor/razor-agent.log
 

kunal

Verified User
Joined
Nov 16, 2005
Messages
23
Hi Martynas,
Thank you for the quick reply.

I followed your instructions, but ran into a few issues.

1. How do I open the ports in my firewall? I am using centOS

2. When I run "python setup.py build" for the pyzor setup, I get the following error:

bash-4.1# python setup.py build
Traceback (most recent call last):
File "setup.py", line 2, in <module>
import setuptools
ImportError: No module named setuptools

Could you please help with these answers.

Thanks,
Kunal
 

kunal

Verified User
Joined
Nov 16, 2005
Messages
23
ok. So i have fixed the first problem by install the setuptools using yum.

How do i open the ports in my firewall?

Thanks,
Kunal
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,796
Location
LT, EU
If you use no firewall, nothing needs to be done :) If you use CSF - you can do that directly in DA admin interface.
 

kunal

Verified User
Joined
Nov 16, 2005
Messages
23
ermm... i am not sure if my host set up the firewall or not.

how do i know if this setup is working?? my emails have gone down considerably in the last few hours, however, i do i check if things are working right?

should i just monitor /var/exim/mainlog?

thank you for all the help

kunal
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,796
Location
LT, EU
If you see no errors in the output of the following commands, then it means everything should work correctly:
Code:
cdcc info
spamassassin --lint
 

kunal

Verified User
Joined
Nov 16, 2005
Messages
23
hi - the following is what i see:

Code:
bash-4.1# spamassassin --lint
May 12 16:04:39.673 [1002] warn: plugin: failed to parse plugin (from @INC): "decode_dns_question_entry" is not exported by the Mail::SpamAssassin::Util module
May 12 16:04:39.673 [1002] warn: Can't continue after import errors at /usr/share/perl5/Mail/SpamAssassin/Plugin/AskDNS.pm line 192
May 12 16:04:39.673 [1002] warn: BEGIN failed--compilation aborted at /usr/share/perl5/Mail/SpamAssassin/Plugin/AskDNS.pm line 192.
May 12 16:04:39.673 [1002] warn: Compilation failed in require at (eval 126) line 1.
May 12 16:04:40.308 [1002] warn: config: SpamAssassin failed to parse line, "/usr/bin/dccproc" is not valid for "dcc_path", skipping: dcc_path /usr/bin/dccproc
May 12 16:04:42.134 [1002] warn: lint: 1 issues detected, please rerun with debug enabled for more information
bash-4.1#
 

ikkeben

Verified User
Joined
May 22, 2014
Messages
705
Location
Netherlands Germany

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,796
Location
LT, EU
hi - the following is what i see:

Code:
bash-4.1# spamassassin --lint
May 12 16:04:39.673 [1002] warn: plugin: failed to parse plugin (from @INC): "decode_dns_question_entry" is not exported by the Mail::SpamAssassin::Util module
May 12 16:04:39.673 [1002] warn: Can't continue after import errors at /usr/share/perl5/Mail/SpamAssassin/Plugin/AskDNS.pm line 192
May 12 16:04:39.673 [1002] warn: BEGIN failed--compilation aborted at /usr/share/perl5/Mail/SpamAssassin/Plugin/AskDNS.pm line 192.
May 12 16:04:39.673 [1002] warn: Compilation failed in require at (eval 126) line 1.
May 12 16:04:40.308 [1002] warn: config: SpamAssassin failed to parse line, "/usr/bin/dccproc" is not valid for "dcc_path", skipping: dcc_path /usr/bin/dccproc
May 12 16:04:42.134 [1002] warn: lint: 1 issues detected, please rerun with debug enabled for more information
bash-4.1#
What's your OS? Please let me know the output of:
whereis dccproc
To solve the second issue (missing perl module):
Code:
cpan -i Mail::SpamAssassin::Util
 

kunal

Verified User
Joined
Nov 16, 2005
Messages
23
i have fixed the ddccproc issue.. was a path problem :rolleyes:

when i ran the cpan command, i get the following:

Mail::SpamAssassin::Util is up to date (undef).

strange, but true.

any other ideas?

thank you for all the help!
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,793
Location
A Coruña, Spain
Maybe this would be a stupid question, but are those utility useful? As far as i can see razor2 agent is not having new release since 2008, so i'm wondering if have sense to implement all this on a prod environment and if that can be useful or not.

Any hint would be appreciated :)

Thanks

Best regards
 

kunal

Verified User
Joined
Nov 16, 2005
Messages
23
any ideas on how i can remove of them? :)

well... i was desperate to try anything since the spam hitting my server was so high.... i have seen a considerable drop ever since I installed these three services...

i am hoping once i fix this last problem, there should be an even better drop.

kunal
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,793
Location
A Coruña, Spain
I don't have that much spam with exim SB 4.dont-remember-what-version :)

yum erase spamassassin for centos/redhat/fedora
apt-get remove spamassassin for debian/ubuntu

Are those projects still active? The fact that last release is 2008 give me some concern.. but maybe the agent is perfect and doesn't need updates.. :)

Regards
 

Musicfreak

Verified User
Joined
Mar 14, 2017
Messages
39
Location
Netherlands
I know this is a old post. But i was also wondering because when i check my log files i see.

spamd[27826]: razor2: razor2 check failed: Connection refused razor2: razor2 had unknown error during get_server_info at /usr/share/perl5/Mail/SpamAssassin/Plugin/Razor2.pm line 187, <GEN12> line 1551. at /usr/share/perl5/Mail/SpamAssassin/Plugin/Razor2.pm line 330, <GEN12> line 1551.
spamd[27826]: pyzor: check failed: internal error, python traceback seen in response

samd[2932]: logger: removing stderr method
spamd[2934]: razor2: razor2 check failed: Connection refused razor2: razor2 had unknown error during get_server_info at /usr/share/perl5/Mail/SpamAssassin/Plugin/Razor2.pm line 187. at /usr/share/perl5/Mail/SpamAssassin/Plugin/Razor2.pm line 330.
spamd[2934]: pyzor: check failed: internal error, python traceback seen in response


also when i run that cpan command i get.

New CPAN.pm version (v2.16) available.
[Currently running version is v1.9800]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
What is the best way to install that one? i do run custombuild 2.

Running Centos.

yum says
No package CPAN available.
 
Last edited:

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,173
Location
GMT +7.00
Make sure to allow Razor to connect to remote port TCP:2703 for outgoing connections in a firewall.
 

tristan

Verified User
Joined
Feb 11, 2005
Messages
425
Location
The Netherlands
This sounds very interesting, any chance in an updated guide to install this with Debian or maybe even with custombuild as an extra option on top of Spamassassin?
 

Imtek

Verified User
Joined
Dec 11, 2005
Messages
144
Location
The Netherlands
This sounds very interesting, any chance in an updated guide to install this with Debian or maybe even with custombuild as an extra option on top of Spamassassin?
This should be installed by default/added to the SpamAssassin config so +1 on that!
 
Top