Re: Postfix MTA and amavisd-new (Debian) calls clamd and spamassassin on a mailgateway (success)
OK, I think I have Spamassasin working with Clamd on my Debian box.
I using the following Debian packages:
>From Sarge:
ii razor 2.361-3 spam-catcher using a collaborative filtering
ii spamassassin 2.63-1 Perl-based spam filter using text analysis
ii spamc 2.63-1 Client for perl-based spam filtering daemon
ii amavisd-new 20030616p7-3 Interface between MTA and virus scanner/cont
>From Woody:
ii postfix 1.1.11-0.woody A high-performance mail transport agent
ii postfix-doc 1.1.11-0.woody Postfix documentation
ii postfix-ldap 1.1.11-0.woody LDAP map support for Postfix
ii postfix-pcre 1.1.11-0.woody PCRE map support for Postfix
ii postfix-tls 1.1.11+tls0.7. TLS and SASL support for Postfix
My master.cf looks like this:
===============================
smtp inet n - y - - smtpd -o content_filter=smtp-amavis:[127.0.0.1]:10024
smtp unix - - - - - smtp
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - - 300 1 nqmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
flush unix n - - 1000? 0 flush
smtp unix - - - - - smtp
showq unix n - - - - showq
error unix - - - - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
smtp-amavis unix - - n - 10 smtp
-o smtp_data_done_timeout=1200
-o disable_dns_lookups=yes
127.0.0.1:10025 inet n - n - 10 smtpd
-o content_filter=spamfilter
-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=127.0.0.0/8
-o strict_rfc821_envelopes=yes
maildrop unix - n n - 30 pipe
user=daemon argv=/usr/bin/maildrop -d $user
spamfilter unix - n n - 10 pipe
user=amavis argv=/etc/postfix/spamfilter.sh -f ${sender} -- ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient
My spamfilter looks like this:
===============================
#!/bin/sh
#
#/etc/postfix/spamfilter.sh
SENDMAIL="/usr/lib/sendmail -i"
SPAMASSASSIN=/usr/bin/spamc
EX UNAVAILABLE=69
$SPAMASSASSIN -f 2>/dev/null \
| $SENDMAIL "$@" || \
{ echo Message content rejected; exit $EX UNAVAILABLE; }
exit 0
My /etc/default/spamd.conf looks like this:
============================================
# /etc/default/spamd.conf
# Duncan Findlay
# WARNING read README.spamd before using. THERE ARE SECURITY RISKS!
# Change to one to enable spamd
ENABLED=1
# Options
# See man spamd for possible options. The -d option is automatically added.
OPTIONS="-c -m 10 -a -H"
# Set nice level of spamd
#NICE="--nicelevel 16"
My /etc/amavis/amavisd.conf looks like this
============================================
$mydomain = 'annapolislinux.org'; # (no useful default)
$daemon_user = 'amavis'; # (no default (undef))
$daemon_group = 'amavis'; # (no default (undef))
$X_HEADER_TAG = 'X-Virus-Scanned'; # (default: undef)
$X_HEADER_LINE = "by $myversion (Debian) at $mydomain";
$forward method = 'smtp:127.0.0.1:10025'; # where to forward checked mail
$notify method = $forward method; # where to submit notifications
On 01/04/04 09:52 -0500, Theodore Knab wrote:
> This is kind of a Postfix MTA question.
>
> I was wondering if anyone has both clamd and amavisd working with spamassassin
> on a mail-gateway.
>
> I recently installed amavisd with clamd. It works great for virus scanning. Now, I want to get
> Spamassassin to run on the mail gateway. Has anyone seen a good how-to for doing this ?
>
> Here is what I did so far.
> http://www.annapolislinux.org/modules.php?op=modload&name=News&file=article&sid=8&mode=thread&order=0&thold=0
>
> Where do I go from here ?
>
> --
> ------------------------------------------
> Ted Knab
> Chester, Maryland 21619 USA
> ------------------------------------------
> 95f6570216275602f62637f6c6574756e202242796e67602f6e60247
> 865602478696e6b696e67602d616368696e6560216e6460247865602
> 56e64602f666028657d616e6964797e2a0
>
>
> --
> To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
--
------------------------------------------
Ted Knab
Chester, Maryland 21619 USA
------------------------------------------
Conquest is easy. Control is not.
-- Kirk, "Mirror, Mirror", stardate unknown
Reply to: