|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Jorge Godoy (godoy_at_ieee.org)
Date: Tue Oct 01 2002 - 19:26:18 CDT
"Sven 'Darkman' Michels" <sven
darkman.de> writes:
> btw. anyone has implemented spamassassin without procmail yet?
> would be nice to have it like content filter or so .. (i dont
> want to set up cpu eating procmail..)
Not a beautiful thing, I just got this recipe from Internet and never
touched it again. If someone wants to improve it, I'd like to know.
In master.cf:
======================================================================
#smtp inet n - n - - smtpd
#smtp unix - - n - - smtp
(...)
# SpamAssassin
filter unix - n n - - pipe
user=filter argv=/usr/local/bin/filter.sh -f ${sender} -- ${recipient}
smtp inet n - n - - smtpd
-o content_filter=filter:
smtp unix - - n - - smtp
-o content_filter=filter:
======================================================================
filter.sh:
======================================================================
#!/bin/sh
INSPECT_DIR=/var/spool/filter
SENDMAIL="/usr/lib/sendmail -i"
SPAMASSASSIN=/usr/bin/spamassassin
# Exit codes from <sysexits.h>
EX_TEMPFAIL=75
EX_UNAVAILABLE=69
cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; }
# Clean up when done or when aborting.
trap "rm -f in.$$; rm -f out.$$" 0 1 2 3 15
cat | $SPAMASSASSIN -P > out.$$ || { echo Message content rejected; exit $EX_UNAVAILABLE; }
$SENDMAIL "$
" < out.$$
exit $?
======================================================================
Regards,
-- Godoy. <godoyieee.org>
"Ser poeta não é minha ambição, é minha maneira de estar sozinho" (Being a poet is not my ambition, it's my way of being lonely) - Fernando Pessoa - To unsubscribe, send mail to majordomo
postfix.org with content (not subject): unsubscribe postfix-users
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]