On Wed, Mar 30, 2005 at 09:49:49AM -0500, Neil Watson wrote:
> I am using a filter as suggested by the Postfix documentation:
[...]
> cat >in.$$ || {
>    echo Cannot save mail to file; exit $EX_TEMPFAIL; }

Put the message in a file ...

> # Specify your content filter here.
> /usr/bin/spamc <in.$$ || {
>   echo Message content quarantined; cat >> /var/spool/mail/quarantine; }

Send the file contents to SpamAssassin unless it's spam and then do
something with quarantine (there's nothing from STDIN at this point,
so you'll probably just hang here).

> $SENDMAIL "$@" <in.$$

Send the file contents back to postfix ...

> The mail is delivered as normal with no rewrites. What have I missed?

spamc returns the message, but you don't do anything with it.  Perhaps you
want something like:

/usr/bin/spamc < in.$$ > out.$$
$SENDMAIL "$@" < out.$$


I'd also look at MailScanner or something similar instead of this script.

-- 
Randomly Generated Tagline:
"You can not make history, you can only hope to survive it."
                                 - G'Kar on Babylon 5, "Rising Star"

Attachment: pgpBtOzm8I1ca.pgp
Description: PGP signature

Reply via email to