Installing ASSP (Anti-Spam SMTP Proxy) On Ubuntu Server 10.04 / Debian 5.0

This How-To document guides you through installing ASSP (Anti-Spam SMTP Proxy) on an Ubuntu 10.04 (LTS) Server or Debian 5.0 in the simplest way possible. It *may* work on later versions but I have no way of knowing how these instructions will work for you. Installing Ubuntu/Debian is beyond the scope of this document and it is assumed you already have the core Ubuntu/Debian OS with no predefined software collections installed.

Even though these instructions will work on any server/computer, since I am working on VMware virtual machine installations myself, I wanted to focus this How-To with side notes of any extra steps you need to take if you're using an Ubuntu Minimal Virtual Machine installation. These will be marked "Minimal Virtual Machines Only". I've included notes on installing VMware tools if you're using VMware.

*** Note: I do not use sudo in this document. Remember to use sudo where appropriate if your account is not a superuser. ***


Install A Minimal Virtual Machine (Optional)

Ubuntu Server's Minimal Virtual machine installation option is a very small installation of core Ubuntu software that installs only the absolutely necessary packages for it to run on a virtual machine. It is highly recommended to choose this option for an ASSP server since ASSP uses so little resources and disk space. My production ASSP server is installed on a VM with one processor core, 512 MB of RAM, and 4 GB of disk space; it is usually using about 6-11% CPU, half the RAM, and about half the disk space. It is merely a blip on the radar in virtual environment terms but it's FAST and its spam-stopping capabilities are excellent! This may or may not be your situation but it's definitely worth to give it a try since I have not found a single disadvantage, just a bunch of advantages.

Just in case you're wondering how to install an Ubuntu Minimal Virtual Machine... when you boot the install CD, on the first install screen: press F4, select Install a minimal virtual machine, then select Install Ubuntu Server.

If you're using VMware, you should always install VMware Tools. This is not a guide on how to install Ubuntu or configure it for VMware so I'm not going to go into much detail, but here's a quick run-down of how to install them:

  1. Install VMware Tools dependencies:
  2. apt-get install build-essential linux-headers-$(uname -r)

  3. Mount the VMware Tools volume by going into the VM menu and selecting Install/Upgrade VMware Tools
  4. Copy the VMware Tools package to your home directory:
  5. * Version numbers used here are for example purposes only.

    mount /dev/cdrom /cdrom
    cp /cdrom/VMwareTools-3.5.0-238493.tar.gz ~
    umount /dev/cdrom

  6. Install VMware Tools:
  7. tar -xf VMwareTools-3.5.0-238493.tar.gz
    cd vmware-tools-distrib

  8. Accept all defaults. If the install script is unable to locate the killall program, tell it that you want to specify its location and enter /sbin/killall5 when it asks.


Install General Dependencies

To get things started, we need a few packages installed that we will be using throughout the set up process and beyond. We will need ssh since this should be the way you connect to your server. We need the telnet client to perform a few tests. And we need wget and unzip to be able to download and uncompress ASSP and other programs.

apt-get install ssh unzip

Minimal Virtual Machines Only:

apt-get install telnet wget


Install NTP

  1. Make sure your time zone is set correctly. If it isn't, run this command and select the correct one:
  2. dpkg-reconfigure tzdata

  3. When you're sure your time zone is correct, install the ntp package:
  4. apt-get install ntp


Install Postfix

  1. Install the postfix package:
  2. apt-get install postfix

  3. Select the default "Internet Site" configuration.
  4. Back up the Postfix master config file /etc/postfix/ :
  5. cp /etc/postfix/ /etc/postfix/

  6. Edit the Postfix master config file /etc/postfix/ :
  7. vi /etc/postfix/

    Look for this line near the beginning of the file...
    smtp      inet  n       -       -       -       -       smtpd
    ...and replace "smtp" with "125" so it looks like this:
    125      inet  n       -       -       -       -       smtpd
  8. Reload the Postfix configuration:
  9. postfix reload

  10. Secure your Postfix server (optional but highly recommended):
  11. Since we want all mail to pass through ASSP before going to Postfix, we need to make sure that the Postfix server cannot be accessed from anywhere else other than the local host. Of course, we could achieve the same with a firewall (and you should!) but this is a double-check in case of an internal network spam-bot, virus, or worm infection that tries to use your server to relay.
    • First, edit your file:
    • cd /etc/postfix

    • Locate the line that begins with mynetworks and add the ip address of the local server with a mask of /32:
    • mynetworks = ###.###.###.###/32 [::ffff:]/104 [::1]/128
    • Add these few lines to the end of the file:
    • smtpd_client_restrictions = permit_mynetworks, reject
      smtpd_delay_reject = no
      transport_maps = hash:/etc/postfix/transport
    • Create a new file called transport ...
    • cd /etc/postfix
      vi transport

      ... and add the following line (put in your domain and the ip address of the server you want to send messages to after ASSP has processed them):
      mydomain.tld  smtp:###.###.###.###
    • Run the postmap command on the transport file to map the file into a lookup table that Postfix can use (this will create a file called transport.db):
    • cd /etc/postfix
      postmap transport

    • Reload the Postfix configuration:
    • postfix reload

    • Now, test it out. Telnet to the Postfix port (i.e. 125) from the local host and then telnet it from anywhere else. The connections from the local host should be permitted but the others should be immediately rejected with 554 5.7.1 Client host rejected: Access denied.


Install Clam AntiVirus

  1. Install ClamAV and the ClamAV Daemon:
  2. apt-get install clamav clamav-daemon

  3. Run freshclam to update all ClamAV definitions.
  4. freshclam

    Don't worry if freshclam reports that ClamAV is outdated. What's important is that the definition files say 'up to date'.



  1. You must reboot now to make sure all the newly installed Ubuntu/Debian software packages boot up cleanly.
Share this page:

16 Comment(s)

Add comment


From: Hilgo at: 2011-06-15 14:26:47

The postfix configuration file is named instead of master.conf so cp /etc/postfix/master.conf /etc/postfix/master.conf.orig should be

cp /etc/postfix/ /etc/postfix/

and vi /etc/postfix/master.conf should be

vi /etc/postfix/

From: at: 2011-07-13 14:33:32

You're absolutely right. Fixing...

From: at: 2012-04-30 19:59:56

Now, test it out. Telnet to the Postfix port (i.e. 125) from the local host and then telnet it from anywhere else. The connections from the local host should be permitted but the others should be immediately rejected with 554 5.7.1 Client host rejected: Access denied.

I telnet from the assp machine:

    # telnet localhost 125         and it connected

Then i telnet from another pc on my network and it also work, what did i do wrong?

   windows: putty

From: at: 2012-07-19 20:15:40

It will let you connect. It should not let you send mail though.

From: BCrowe at: 2012-01-25 17:13:48

The default 'SMTP Destination' port for ASSP is 1025... you use 125 in /etc/postfix/

From: at: 2012-03-13 23:47:18

Hmm... strange... in my version at the time I wrote this it was 125. But it really is irrelevant. You can set it up to whatever you like. Port 125 can be considered an example.

From: Anonymous at: 2011-03-13 19:21:12

Hey, I am curious - is ASSP better then Amavis (SpamAssasin + ClamAV)? What are the advantages of using ASSP? I am now using Postfix - Amavis (SA+ClamAV) - Dovecot. Does it take much to install ASSP on the same host and let it work properly? Thanks!

From: at: 2011-03-17 14:12:58

Well, quite honestly, I've never used Amavis. Although I was using MailScanner before ASSP. I have a SysAdmin friend who does have an Amavis setup just like you and, from what I've gathered, the procedure to set up is pretty much like MailScanner -- lots of files to edit and pretty much no good interface. Not to mention that IMHO they're not that good at blocking spam without a bunch of add-ons and plug-ins. In summary, ASSP is exremely easy to set up: install postfix, install the required perl modules, and then dump the ASSP folder in /usr/share and that's it -- it's all there! It has every technique programmed in there: redlisting, graylisting, spf, rbl, etc. From there on its the usual configuring of your domains, relays, etc but with a pretty nice Web GUI. It's just so easy to install and set up I recommend you just give it a try; if you dont like it, you didnt waste much time. And since it's perl, it can be installed in any OS that can run perl: osx, windows, etc.

From: Munna at: 2011-04-17 07:54:21

i was a system admin of mid sized ISP at bangladesh for 20 months, my domain was attacked by DDOS attack or email bombing.. 100,000 backscatter email per hour... my whole AS which contain 2048 ip was blacklisted to UCEPROTECT LEVEL-3. then i setup ASSP to protect backscatter. it was rolling like a killer.... my job got saved for this... it is way better then any combination of opensource antispam tech....ASSP is the best of the best.....


From: David T at: 2013-01-21 16:11:52

ASSP was simple install and it does do a great job blocking SPAM. However, beware that there is no support for this product. Once you paid you are on your own. The only help you can get is in a forum. We are still having configuration issues with not being able to get a report of whitelisted or blacklisted emails. When we configure it to send attachments above 10 meg that does not work. I have had the problem with ASSP blocking only my range of IP addresses form my ISP. There are many others issues here and there, too many to list, but this program is time consuming each and everytime there is a cpanel or ASSP update.

From: Bernhard Knoll at: 2011-05-31 15:23:12



in case anyone wonders, the username / password for dthe WebGUI is:


user: root

password: nospam4me

From: at: 2011-07-13 14:39:48

Thanks for the hint. Actually, you can leave the username blank. ASSP only uses a password (which is why it's especially important to only allow access to the management page from trusted hosts). Including it in the doc...

From: S Reed at: 2011-10-10 21:51:56

Just went through this install again because we got a new server and virtualizing what we can... But I had an issue with perl not being able to install Net::DNS - it returned an error each time. Looked around and found that they have released another package and that cleared it up for me. Before you run 'perl' run 'apt-get install libnet-dns-perl'. That allowed all of the packages to install clean.


From: at: 2012-03-13 23:51:34

Yeah... Perl gives me all sorts of strange dependency errors all the time. I have very little experience with perl modules and it's kinda just trial and error until the modules compile right. Thanks for the tip.

From: Will OS at: 2011-11-08 12:52:03

This setup works perfectly for inbound mail. However ASSP requires that outbound mail also pass through ASSP in order for the whitelisting function to work correctly.

Would I have to change the above postfix configuration to allow for this? And DAE know how to get my mail server (Kerio) to route mail through ASSP on the way out?

From: at: 2012-05-03 14:58:21

I can't get this setup to work. CAN YOU DO A Step-by-Step TUTORIAL for ASSP V2 (on ubuntu server 10.04/12.04)