Fight Spam: ASSP (Anti-Spam SMTP Proxy) On CentOS 5.4

The Anti-Spam SMTP Proxy (ASSP) server project is an Open Source, Perl based, platform-independent transparent SMTP proxy server that leverages numerous methodologies and technologies to both rigidly and adaptively identify e-mail spam. ASSP is easy to set up because it requires only minor changes to the configuration of your your Mail Transfer Agent.

Also please read the ASSP documentation

Preliminary Note

In this tutorial I use a base 32 bit server install with the hostname server1.example.co.za with the IP address 10.0.0.10. These settings might differ for you, so you have to replace them where appropriate.

Adjust any package names if installing the EL4 or 64 bit packages. If any dependencies are unsatisfied, install the required packages and retry

If you have already installed the RPM Forge repository do so by running the following command

Now lets install the Perl components needed to run ASSP (Anti-Spam SMTP Proxy) on CentOS 5.4. Firstly we upgrade Perl and then install the Perl modules.

If and in order to run ClamAV anti-virus along with ASSP (Anti-Spam SMTP Proxy) install the ClamAV RPM

Next we’ll download and install ASSP (Anti-Spam SMTP Proxy)

Firstly check and grab the link for the latest version of ASSP on thier website, the version used in this post is ASSP Version: 1.6.5.5(1.0.02). Copy the direct download link for the latest version and download it.

Lets get ASSP.

Make some preparations. Create the following directories that ASSP (Anti-Spam SMTP Proxy) will use to maintain the SPAM

Now unpack ASSP.

# unzip ASSP_1.6.5.5-Install.zip
# cd ASSP_1.6.5.5-Install

And put ASSP in place.

Create following startup scripts.

Lets start ASSP for the first time.

You should be able to connect to ASSP web interface at this point. http://server1.example.co.za:55555. Specify anything for “username”, default “password” is nospam4me

At this point you shall see that ASSP is unable to bind to port 25. We need to stop and disable CentOS default mailer Sendmail.

or

Now let’s shutdown ASSP with “Ctrl-C”. Now add the init script to chkconfig, set the run levels and start ASSP.

Now lets do some minimal ASSP Configuration, point you browser to http://server1.example.co.za:55555

Network Setup

* SMTP Listen Port 25
* SMTP Destination 25

SMTP Session Limits
Testmode

* All Testmode ON – Running in this mode for two weeks to build the spamdb and whitelist

SPAM Control

* Prepend Spam Subject {ASSP-SPAM}

Copy Spam & Ham
Spam Lover/Hater
No Processing
Redlisting/Whitelisting
Relaying
Recipients
Validate Helo
Validate Sender
IP Blocking
Penalty Box
Delaying
SPF/SRS
DNSSBL
URIBL
Attachment Blocking
ClamAV

* Port or file socket for ClamAV (AvClamdPort) – /var/run/clamav/clamd.sock

Regex Filters / Spambomb
Bayesian Options
Backscatter Detection
Email Interface
File Paths
Collecting
Logging
LDAP Setup
DNS Setup
Server Setup

After a week rebuild the bayes database. Check the directories /usr/share/assp/spam and nospam for wrong entries, if good mail ends up in the spam directory please move it to the nospam directory and vice versa. After that do:

Finally let’s add the bayes database rebuild to crontab.

  • Pingback: #ASSP (Anti-Spam SMTP Proxy) On CentOS 5.4 part 2 | How 2 #CentOS()

  • http://twitter.com/pdreissen Pascal Dreissen

    Hi,

    Great tutorial, are you ok if i make a link to this from the ASSP wiki ?

    Thanks!

  • How2CentOS

    Please go ahead. The ASSP software is great, informative and STOPS spam dead in it's track!

  • Rob

    Can I do part 2 of this tutorial right away, or do I have to wait a week for the bayes database to build?

  • Rob

    …never mind… I just realized that until I do part two this assp server isn't going to be receiving any mail! 😎

  • Zehad

    i have install successfully.but, its dosnt shows any web page like http://smtp.mydomain.com:55555………. what should i do now.please help me about this regards.

  • Anonymous

    @Zehad – First check of you have SELinux disabled and the firewall disabled. If yes, then from the machine you installed ASSP on are you able to # telnet localhost 55555 ? If you can then try from a machine on the same subnet and make sure that there isn’t a firewall in between.

  • Henry

    Please don’t use that crontab. it will fire off every minute, of every hour, every Sunday. At least until you run out of memory and kill your server. It needs a minute and hour, and you should use the 3-character abbreviation for the day as well, something like:

    15 3 * * sun cd /usr/share/assp && perl rebuildspamdb.pl

  • Anonymous

    I have adjusted the tutorial accordingly. Thanks for the input Henry

  • Arvy

    Nice, but I got:

    Can’t locate Time/HiRes.pm in @INC:disqus 

    so I had to run:

    yum install perl-Time-HiRes

    before run ASSP.

  • http://www.facebook.com/EriksGoodwin Eriks Goodwin-Pfister

    I don’t see any file on my server called rebuildspamdb.pl. There is only a file by that name with a .pm extension on it. I am running the latest v2 of ASSP.

  • fbifido

    Hi,
    Can you do a step-by-step post on how to install and configure ASSP 2.3.3 on centos 6.4 & unbuntu LTS 12.04.2 ?

    but show the connection-flow first, eg:
    1) You can do a step-by-step install and config using this flow:
    (IN) internet->25-ASSP->25-MailServer->110-Users
    (OUT) Users->225-ASSP->25-MailServer->Internet

    2) (IN) Internet->25-ASSP-125-Relay->25-MailServer->110-Users
    (OUT) User->25-MailServer->225-ASSP-125-Relay->Internet

    in flow-option-2 the ASSP & Relay are on the same machine.

  • mousematt

    Hi, thanks for this great tut!
    Note: in ASSP v2.x the default username is root (pw still nospam4me).
    Hope that helps somebody!
    Cheers,
    Matt

  • PaintDrinkingPete

    Just an FYI for anyone following this guide, the “rebuildspamdb.pl” requirement is no longer necessary as it’s now a process built in to the assp.pl (which is why the file no longer exists in the assp directory). Can be run from the GUI as well.

  • GeorgeRushby

    Thanks for the update PDP – It’s been a while since I wrote this article. Other than the “rebuildspamdb.pl” requirement is the guide still good?

  • PaintDrinkingPete

    As far as I can tell yes — this was a very helpful resource for me!