July 2007
Install some packages: apt-get install spamassassin spamc spamoracle spampd spamprobe clamav clamav-base clamav-daemon clamav-freshclam postfix postfix-tls
Leave /etc/spamassassin
and /etc/clamav
as they are (for now)
Add a SpamAssassin-specific system user: adduser --system spamass
Start SpamAssassin
:
/etc/init.d.spamassassin restart
Start the spampd daemon: /etc/init.d/spampd start
Edit /etc/amavis/conf.d/20-debian-defaults
(the last two lines are the modification) in oder to grant access from other machines than localhost:
$inet_socket_port = 10024; # default listenting socket @inet_acl = ( '127/8', 'my.ip.nnn/24' ); #This needed to grant access to mailservers JBJB JB 20070717 $inet_socket_bind = undef; #This needed too to grant access to mailservers JBJB JB 20070717
Restart the amavis
daemon:
/etc/init.d/amavis restart
On the mail server, all we have to do is to point PostFix
to the new mailscanner
via a small snippet in /etc/postfix/main.cf
[17]
:
content_filter = smtp-amavis:[ip.of.new.filterhost]:10024
[17]
This assumes that in /etc/postfix/master.cf
you already have a snippet like this to enable it to receive from the mailscanner:
10025 inet n - n - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=my.first.ip.range/no_bitsmasked,my.second.ip.range/no_bitsmasked -o mynetworks_style=host -o strict_rfc821_envelopes=yes