|
|
11. The software needed against viruses and SPAMThis chapter describes how to install and handle the software against viruses and SPAM 11.1. Getting and installing ClamAV11.1.1. DownloadOrigin-Site: http://prdownloads.sourceforge.net/clamav/clamav-0.68.tar.gz 11.1.2. Building and installing
11.1.3. Testing and configuringTo test the funtionality of clamav, you can run clamscan to get some results from the testpatterns that are included in the clamav distribution run clamscan -r -i /usr/local/clamav-0.68 The output should look like this:
Next step is to setup the automated update of the virus database. This is a important step, because the speed of virus spreading is fast and would pick up even further. Create the needed logfiles
I suggest to update the signatures with a hourly cronjob. To edit the crontab issue crontab -e and add the following line, and replace the »x« with a random value between 1 and 59. This is some kind of time based loadbalancing to ensure more people can fetch the updated.
To test if the update process is working, please issue the command /usr/local/bin/freshclam -l /var/log/clam-update.log and have a look at the output. The output should look similar to this:
11.2. RazorRazor is one of the prerequisites of spamassassin. 11.2.1. DownloadOrigin-Site: http://prdownloads.sourceforge.net/razor/razor-agents-sdk-2.03.tar.gz?download Origin-Site: http://prdownloads.sourceforge.net/razor/razor-agents-2.40.tar.gz?download
11.3. Getting and installing spamassassinSpamassassin is the todays leading opensource project to fight against SPAM. To describe how spamassassin works would be too much for this document. For further information please consult http://eu.spamassassin.org/doc.html 11.3.1. DownloadOrigin-Site: http://eu.spamassassin.org/released/Mail-SpamAssassin-2.63.tar.gz 11.4. Getting and installing amavisd-newAmavisd-new is the software that glues all the software described above together to postfix 11.4.1. DownloadOrigin-Site: http://www.ijs.si/software/amavisd/amavisd-new-20030616-p8.tar.gz 11.4.2. PrerequisitesAmavisd-new needs a lot of prerequisites. Run perl -MCPAN -e shell and issue:
At the end run ./amavisd and have a look at overseen prerequisites. Edit /etc/amavisd.conf and change the variables $daemon_user to »amavis« and $daemon_group to »amavis«. Another variable to change is $mydomain to match your domain. Please also consider to change the default settings for virus and spam mails to avoid being notified about every intercepted mail
In the beginning of SPAM filtering I recommend to set the kill-value to something higher until you tweaked the filters. Change the variable $sa_kill_level_deflt to 8 or even higher. 11.4.3. Building and installing
Now it is the the time to define a group and a user for amavisd-new
Next you have to define a directory for the quarantined mail:
The original init script in the amavisd-new distribution does only work work with Redhat. Other distributions need to install my quick and dirty init-script:
11.5. Setting up postfixPostfix needs to be configured to send each mail to amavis-new in order to get sanitized. You need to add the following line to /etc/postfix/main.cf
The /etc/postfix/master.cf needs also some adjustments to return the results from amavisd-new to the mailingsystem. Please add the following lines to your configuration:
|