| This is an alternative to the instructions at FilterMailWithSpamAssassinAndProcMail. | ||||||||
| Changed: | ||||||||
| < < |
The general theory is that incoming mail will be piped through a SendMail? "milter", or mail filter, before delivery. | |||||||
| > > |
The general theory is that incoming mail will be piped through a SendMail "milter", or mail filter, before delivery. | |||||||
| The milter I recommend has the nice feature that it only processes mail bound for local delivery, and not mail passing through the server as an intermediate hop in a relay chain. That is, if you're running a backup MX for an associate, mail that is eventually bound for delivery at their server will not be processed. This saves resources on your server and | ||||||||
| Line: 61 to 61 | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
| Changed: | ||||||||
| < < |
3. Configure SendMail? | |||||||
| > > |
3. Configure SendMail | |||||||
| Add this near the end of your LocalSendmailConfiguration: | ||||||||
| Line: 1 to 1 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Added: | ||||||||||
| > > |
This is an alternative to the instructions at FilterMailWithSpamAssassinAndProcMail.
The general theory is that incoming mail will be piped through a SendMail? "milter", or mail filter, before delivery.
The milter I recommend has the nice feature that it only processes mail bound for local delivery, and not mail passing
through the server as an intermediate hop in a relay chain. That is, if you're running a backup MX for an associate, mail
that is eventually bound for delivery at their server will not be processed. This saves resources on your server and
gives your associate the ability to not use SpamAssassin if they chose not to.
Advantages:
1. Install SpamAssassin
2. Install the milter
gcc -L/usr/obj/usr/src/lib/libsm -lsm -lmilter -pthread spamassassin_milter.c -o spamassassin_milter
#!/bin/sh
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 1
fi
case "$1" in
start)
if [ -x ${PREFIX}/sbin/spamassassin_milter ]; then
${PREFIX}/sbin/spamassassin_milter -p unix:/var/run/spamassassin_milter.sock &
echo -n ' spamassassin_milter'
fi
;;
stop)
killall spamassassin_milter && echo -n ' spamassassin_milter'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac
exit 0
3. Configure SendMail?Add this near the end of your LocalSendmailConfiguration:INPUT_MAIL_FILTER(`SpamAssassinFilter', `S=unix:/var/run/spamassassin_milter.sock') define(`confMILTER_LOG_LEVEL', 7) 4. Return to FilterMailWithSpamAssassin to finish up.-- KirkStrauser - 03 Jul 2003
| |||||||||