Google Site SearchFN Site Search FN Blog Login FN Blog Login
Site Navigation:

Creating an SMTP spam proxy server with ASSP

by Keith Howanitz on March 09, 2004

Anti-Spam SMTP Proxy (ASSP) Server project is an open source platform-independent SMTP Proxy server which implements whitelists and Bayesian filtering. This short how-to explains how to set up ASSP on a Fedora Core 1 computer.

This tutorial assumes that you have Fedora Core 1 installed on a computer with PERL. It also assumes that this computer will act solely as a SMTP proxy server, providing no other services.

First, ensure that all services not needed are shutdown, and will not restart on boot. You may do so with the command:

from the shell. The only network service that should be running is ssh for remote access. In particular, ensure that sendmail and http (apache) are disabled. This may also be a good time to update the server with all security updates. You may do so with the command:
yum update
Once complete, reboot and check to ensure none of the daemons you disabled restarted.

Download the ASSP software here. Also download the sample spam database from the same page. Unzip the program into the home directory:

unzip -d /home/
This will put the executable and all the other files in /home/assp/. Move the sample spam database to that folder, cd to the /home/assp/ directory, then extract it with the command:
tar -xf asspsmpl-0.1.tgz -z
Now you have just a few more preliminary steps to preform before running ASSP for the first time.

Now, you must create the directorys needed to store the spam databases. Start by moving the sample data to the correct directorys with the following while in /home/assp/:
mv asspsmpl/notspam ./
mv asspsmpl/spam ./
then create the remaining directories with:
mkdir errors
mkdir errors/spam
mkdir errors/notspam
Now you are done with all of your preliminary work!

While still in the assp directory, run:

to start assp. This will start it's internal webserver. You may connect to it at the URL:
where is the IP address of the ASSP server. The latest documentation for configuring ASSP can be found here.


To finish, you will wish to setup your new system so that ASSP starts automatically on boot, and also setup a cron job so that the filter is updated each night.

To update the filter each night, here is a simple sample script that can be added to the /etc/cron.daily/ directory to rebuild the spam database each night. Replace /home/ with the correct directory (if you have chosen a different install directory), and make the file executable with

chmod a+x update_assp
(do not copy the dashed lines).

# update_assp
# place this file in /etc/cron.daily/ to update the
# assp database each night
cd $BASE
# Rebuild the spam database
/usr/bin/perl /$BASE/assp/

To start ASSP on boot, add the following to end of /etc/rc.local

# Start the ASSP proxy service
/usr/bin/perl /home/assp/ /home/assp