ASSP With Embedded ClamAV Integrated Into Postfix With Virtual Users And Domains

Version 1.1
Author: Oliver Meyer <o [dot] meyer [at] projektfarm [dot] de>

This document describes how to integrate ASSP (Anti-Spam SMTP Proxy) with embedded ClamAV into a mail server based on Postfix featuring virtual users and domains, i.e. users and domains that are in a MySQL database. It rests upon parts of the howto Users And Domains With Postfix, Courier And MySQL (Debian Etch) from Falko Timme.

The resulting Postfix server is functionally almost identic with the one from the howto above mentioned, but doesn't need Amavisd. ASSP provides a comfortable, considerable web-interface for setup/configuration.

This howto is meant as a practical guide; it does not cover the theoretical backgrounds. They are treated in a lot of other documents in the web.

This document comes without warranty of any kind! I want to say that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!

 

1 Preparation

Please follow the howto Users And Domains With Postfix, Courier And MySQL (Debian Etch) from Falko Timme from step 1 - 8 + 13 before you proceed.

 

2 Needed Packages

First we have to install a few packages needed by ASSP:

apt-get install libcompress-zlib-perl libdigest-md5-perl libemail-valid-perl libfile-readbackwards-perl libmail-spf-query-perl libmail-srs-perl libnet-dns-perl libsys-syslog-perl libnet-ldap-perl libtime-hires-perl unzip

 

3 Get ASSP

Download and unzip ASSP:

cd /usr/src/
wget http://mesh.dl.sourceforge.net/sourceforge/assp/ASSP_1.3.3.1-Install.zip
unzip ASSP_1.3.3.1-Install.zip

 

4 Install ASSP

Prepare some directorys:

mkdir -p /usr/share/assp/spam
mkdir /usr/share/assp/notspam
mkdir /usr/share/assp/errors
mkdir /usr/share/assp/errors/spam
mkdir /usr/share/assp/errors/notspam

Copy ASSP to the right destination:

cd /usr/src/ASSP_1.3.3.1-Install/
cp -R ASSP/* /usr/share/assp/

 

5 Create Script

To the considerable use of ASSP we create the following script (thanks to Ivo Schaap) and the runlevel-entries for autostart:

vi /etc/init.d/assp
#!/bin/sh -e
# Start or stop ASSP
#
# Ivo Schaap <[email protected]>

PATH=/bin:/usr/bin:/sbin:/usr/sbin

case "$1" in

    start)
        echo -n "Starting the Anti-Spam SMTP Proxy"
        cd /usr/share/assp
        perl assp.pl
    ;;

    stop)
        echo -n "Stopping the Anti-Spam SMTP Proxy"
        kill -9 `ps ax | grep "perl assp.pl" | grep -v grep | awk '{ print $1 }'`
    ;;

    restart)
        $0 stop || true
        $0 start
    ;;

    *)
    echo "Usage: /etc/init.d/assp {start|stop|restart}"
    exit 1
    ;;

esac

exit 0
	

Change the permission:

chmod 755 /etc/init.d/assp

Create the runlevel-entries:

update-rc.d assp defaults

Start ASSP for the first time:

/etc/init.d/assp start
Share this page:

4 Comment(s)