Table of Contents
Amavisd-new is a program that receives mail from Postfix, passes it through SpamAssassin and ClamAV and based on the user (or global) settings decides if the mail should be flagged as a spam, deleted or delivered as a legitimate mail.
We are going to install all of the packages at once.
apt-get install amavisd-new spamassassin clamav-daemon
ClamAV needs some utilities that are not provided in the mail Debian repository. This utillities will be used to extract email attachments so the content of the archives can be scanned for potential viruses.
Because of this utillites we need to add
contrib and non-free
repositories to the /etc/apt/sources.list
. To do this
you have to append ”contrib non-free
” on
every line that starts with deb, and ends with main. Your
/etc/apt/sources.list
file should look like
this:
deb http://ftp2.de.debian.org/debian/ squeeze main contrib non-free deb-src http://ftp2.de.debian.org/debian/ squeeze main deb http://security.debian.org/ squeeze/updates main contrib non-free deb-src http://security.debian.org/ squeeze/updates main deb http://ftp2.de.debian.org/debian/ squeeze-updates main contrib non-free deb-src http://ftp2.de.debian.org/debian/ squeeze-updates main
After editing /etc/apt/sources.list
commit the
changes you made to sources.list
with etckeeper. Now
we need to update the apt database. While we are at it we can also check
if there are any packages that should be updated.
apt-get update apt-get upgrade
Now we are ready to install utilities for decompression of archives.
apt-get install arj bzip2 cabextract cpio file gzip lha nomarch pax rar unrar unzip zip zoo
Add clamav user to the amavis group and vice versa in order for Clamav to have access to scan files:
adduser clamav amavis adduser amavis clamav
Restart amavis and clamav-daemon.
/etc/init.d/clamav-daemon restart /etc/init.d/amavis restart