Amavis
apt-get install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 unzoo libnet-ph-perl libnet-snpp-perl libnet-telnet-perl nomarch lzop paxThe configuration amavisd-new is split up in various files which reside in the /etc/amavis/conf.d directory. Take a look at each of them to become familiar with the configuration. Most settings are fine, however we must modify two files: First we must enable ClamAV and SpamAssassin in /etc/amavis/conf.d/15-content_filter_mode by uncommenting the @bypass_virus_checks_maps and the @bypass_spam_checks_maps lines: Now you should take a look at the spam settings and the actions for spam-/virus-mails in /etc/amavis/conf.d/20-debian_defaults. There's no need to change anything if the default settings are ok for you. The file contains many explanations so there's no need to explain the settings here:
vi /etc/amavis/conf.d/20-debian_defaultsChange spam_destiny as follows.
$final_spam_destiny = D_PASSFinally, edit /etc/amavis/conf.d/50-user and add the line $pax='pax'; in the middle:
vi /etc/amavis/conf.d/50-user use strict; # # Place your configuration directives here. They will override those in # earlier files. # # See /usr/share/doc/amavisd-new/ for documentation and examples of # the directives you can use in this file # $pax='pax'; #------------ Do not modify anything below this line ------------- 1; # insure a defined return
Configure ClamAV
- DetectPUA
- Detect Possibly Unwanted Applications.
- Default: No
- DetectBrokenExecutables BOOL
- With this option clamd will try to detect broken executables (both PE and ELF) and mark them as Broken.Executable.
- Default: no
- ScanPDF BOOL
- This option enables scanning within PDF files.
- Default: no
adduser clamav amavis /etc/init.d/amavis restart /etc/init.d/clamav-daemon restartIf you like you can now add Razor, Pyzor, and DCC to SpamAssassin to improve its filtering performance. Razor, Pyzor and DCC are spamfilters that use a collaborative filtering network. To install them, run
apt-get install razor pyzor dcc-client
Configure SpamAssassin
Now we have to tell SpamAssassin to use these three programs. Edit /etc/spamassassin/local.cf and add the following lines to the end of it.vi /etc/spamassassin/local.cf # dcc use_dcc 1 dcc_path /usr/bin/dccproc add_header all DCC _DCCB_: _DCCR_ dcc_dccifd_path /var/lib/dcc/dccifd #pyzor use_pyzor 1 pyzor_path /usr/bin/pyzor add_header all Pyzor _PYZOR_ #razor use_razor2 1 razor_config /etc/razor/razor-agent.conf #bayes use_bayes 1 use_bayes_rules 1 bayes_auto_learn 1
Configure Pyzor
pyzor ping
Configure Razor
razor-admin -create razor-admin -register -user=postmaster@example.orgMake a note of your password.
cat ~/.razor/identity
Configure DCC
Enable the DCC pluginvi /etc/spamassassin/v310.preUncomment the following line.
#loadplugin Mail::SpamAssassin::Plugin::DCCRemove the local server from the configuration, as we are operating as a client only.
cdcc "delete 127.0.0.1" cdcc "delete 127.0.0.1 Greylist"Test the installation with:
cdcc infoRestart amavisd-new afterwards:
/etc/init.d/amavis restartReferences
- http://sanesecurity.co.uk
- http://www.howtoforge.com/ispconfig_sanesecurity_clamav_debian_ubuntu
- http://www.ijs.si/software/amavisd/README.postfix
- http://www.akadia.com/services/postfix_amavisd.html
- http://flakshack.com/anti-spam/wiki/index.php
$Id: AmavisSpamAssassinAndClamAV,v 1.5 2008/01/06 09:45:39 martin Exp $
Wiki Index All Recent Edit Top

