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

Want to support HowtoForge? Become a subscriber!
 
Submitted by o.meyer (Contact Author) (Forums) on Tue, 2007-09-04 16:31. :: Anti-Spam/Virus | Debian | Postfix

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>
Last edited 09/27/2007

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 <ivo@lineau.nl>

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


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by TTown (registered user) on Wed, 2007-09-26 19:50.

Trying to unzip the VM winrar (3.70) returns:

C:\Documents and Settings\StErin\Desktop\ASSP_With_Embedded_ClamAV_Integrated_Into_Postfix_With_Virtual_Users_And_Domains__Debian_Etch_.zip: Unexpected end of archive

I downloaded it twice but the error remained. Could you please verify your archive?

(I love downloading your projects as VMs. This is so nice to troubleshoot my own projects)

Submitted by o.meyer (registered user) on Thu, 2007-09-27 13:43.

I've created a new VM - it will be available tomorrow.
I also overhauled the Howto to v1.1 (two little changes).

 Olli

Submitted by admin (registered user) on Thu, 2007-09-27 11:02.
Yes, you're right... I've asked Oliver (the author) to check this and upload a new zip archive.
Submitted by jon (registered user) on Thu, 2007-09-06 06:07.
Wow!  Thank you.  Thank you is all I can say, assp is just perfect, amazing and everything else.  This was easy to follow and worked perfect, my spam has dropped to nearly zero.  I've been a supporter of howtoforge.com for a while now, and this just made it worth more than I could ever pay