I'm trying to set up spamc/spamd with postfix by piping a shell script
inside master.cf file of postfix.
I created a user "filter" and a directory /var/spool/filter.
I also created a directory ( /opt/spamfilter ) with the following shell
script (filter.sh)

SENDMAIL="/usr/lib/sendmail -i"
# Exit codes from <sysexits.h>

cat | $SPAMASSASSIN -f -u filter 2>/dev/null | $SENDMAIL "$@" ||
   { echo Message content rejected; exit $EX_UNAVAILABLE; }

exit 0

I added in the master.cf file the following line

filter unix    -       n       n       -       -       pipe
  Flags=Rq user=filter argv=/opt/spamfilter/filter.sh -f ${sender} --

It's working fine, but a few bad events happens

1) The message incoming appears to be repeatedly processed by
spamc/spamd and filter.sh

2) processes (spamc e filter.sh) are duplicated all time a message has
processed and they stay in memory for several time increasing the
processing time for new messages.

3) The Subject of the email delivered say:"Undisclosed Recipient"; while
without Spamassassin the postfix agent has worked fine.

Thanks a lot, regards,


This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
Spamassassin-talk mailing list

Reply via email to