Better Anti Spam solution?

6 posts / 0 new
Last post
#1 Fri, 11/04/2016 - 14:14
cursor

Better Anti Spam solution?

For the past few months I have seen spam increase over 300% on our servers and Spamassassin is doing a very crappy job tagging it as such. My inbox is flooded with spam every day and no matter how much training I give to spamassassin it does not reduce the number of messages. I would say that Spamassassin is missing over 80% of the spam that comes into my server. Is there a better solution even if it is a paid service? Spamassassin is very integrated into Virtualmin so I would like to know if it is possible to replace it with something else without breaking email.

Thanks.

Mon, 11/07/2016 - 20:23
applejack

Install DCC, Razor and Pyrzor as this helped spam assassin flag a lot more spam.

Take a look at these

https://marcocarcano.wordpress.com/postfix-mail-server-how-to-set-up-a-c...

http://www.iredmail.org/forum/topic481-iredmail-support-install-pyzor-ra...

Below is how I did it on CentOS 6 but do not blindly follow verbatim.

Also take a look at what I posted on https://www.virtualmin.com/node/43369#comment-765808 re configuring Postfix as this has been the most successful at reducing spam by over 90% so far as it doesn't even reach spam assassin it gets rejected by the mail server before it hits it.

In Spam assassin my threshold is set to 2.

INSTALL AND SETUP PYRZOR

Open the following ports on your firewall
DCC port 6277 UDP
Razor2 port 2703 TCP
Pyzor port 24441 UDP

enable epl.repo
yum install pyzor perl-Razor-Agent

create user and group amavis including home directory

mkdir /etc/mail/spamassassin/.razor
mkdir /etc/mail/spamassassin/.pyzor
chown amavis:amavis /etc/mail/spamassassin/.razor
chown amavis:amavis /etc/mail/spamassassin/.pyzor

su -m amavis -c 'pyzor --homedir /etc/mail/spamassassin/.pyzor discover'
su -m amavis -c 'razor-admin -home=/etc/mail/spamassassin/.razor -create'
su -m amavis -c 'razor-admin -home=/etc/mail/spamassassin/.razor -register'

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.158
./configure --with-uid=amavis
make
make install
chown -R amavis:amavis /var/dcc
ln -s /var/dcc/libexec/dccifd /usr/local/bin/dccifd

-----
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
add_header all Pyzor _PYZOR_

# razor
use_razor2 1
razor_config /etc/mail/spamassassin/.razor/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
loadplugin Mail::SpamAssassin::Plugin::DCC

testing commands
spamassassin -t -D razor2 < /usr/share/doc/spamassassin-3.3.1/sample-spam.txt
spamassassin -t -D pyzor < /usr/share/doc/spamassassin-3.3.1/sample-spam.txt
cdcc info
echo "test" | spamassassin -D pyzor 2>&1 | less

spamassassin -t -D < /tmp/spam
Tue, 01/03/2017 - 11:54
uinfor

Thank you applejack i make this and i check its working but i'm not sure how test, can i test through virtualmin or sending mails ¿?? It's possible that razor or other needs more config???

Best regards

Sun, 01/08/2017 - 11:20
applejack

Hi uinfor

You can test using the commands I listed and also by looking at your mail header for emails you receive.

Sun, 01/08/2017 - 14:10
Joe
Joe's picture

Also, if you don't have greylisting enabled, I recommend it. It can be setup within Virtualmin, and it blocks a big bunch of bulk senders, because they never re-try after being denied one time (while legitimate mail servers will always resend the message after 1-20 minutes).

--

Check out the forum guidelines!

Fri, 01/13/2017 - 18:15
calderwood
calderwood's picture

Excellent. Worked like a treat. Centos 6.6

Have seen such an increase in spam over the last few months. Hopefully this cuts it down.

David Calderwood - Euro-Pacific Digital Media

Topic locked