Michael Frotscher wrote:
On Saturday 11 November 2006 22:49, Michael Scheidell wrote:
What happens with this:
user=${recipient} argv=/usr/bin/spamc -e /usr/sbin/sendmail -oi -f
${sender} > ${recipient}
Does not work.
are you after
user=${user}
But I found that postfix knows serveral variables for each
incoming mail, one of them being the local user (without domain extension)
the mail is being delivered to. This can be used to run spamc as the desired
user:
spamassassin unix - n n - - pipe
user=nobody argv=/usr/bin/spamc -u $user -e /usr/sbin/sendmail -oi -f
${sender} ${recipient}
He can indeed use the "obsolete" form.
In both cases, he must have resolved his aliases so that $user is a real
account. In particular, he should use virtual aliases instead of local
aliases, and he must enable alias expansion before the filter, not after
the filter as is usually done.
If he is delivering mail to local accounts, it is probably better to run
spamc from procmail|maildrop...
If he is forwarding mail, he can still "cheat" by delivering it locally
(he already have the accounts on the machine), then forwarding it using
addresse rewrite tricks or using multiple instances of postfix.
but all this is more appropriate on the postfix ML.