postfix-users April 2011 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: ${user} parameter with pipe to spamc

Re: ${user} parameter with pipe to spamc

From: Noel Jones <njones_at_nospam>
Date: Fri Apr 22 2011 - 18:54:21 GMT

On 4/22/2011 1:31 PM, Roy McMorran wrote:
> Greetings,
> I'm attempting to use the following in to integrate
> with SpamAssassin:
> smtp inet n - n - - smtpd -o content_filter=spamassassin
> ...
> spamassassin unix - n n - - pipe flags=R user=nobody
> argv=/usr/bin/spamc -u ${user} -e /usr/sbin/sendmail -oi -f
> ${sender} ${recipient}
> (along with spamassassin_destination_recipient_limit = 1 in
> I want to use the '-u' argument with spamc because each user
> needs a user_prefs file in his home directory. However, the
> '${user}' macro isn't always returning the desired value for
> this purpose, i.e. in the case where the To: address was an
> alias rather than the actual (OS) user name. Is there any way
> to determine the user name after the alias has been expanded?
> PS: I'm trying to avoid the use of procmail in favor of
> dovecot-lda (and sieve).
> Thank you,

Put your local aliases in virtual_alias_maps rather than

Note the format of the file is a little different. You'll
need to use fully-qualified addresses for both the key and
result, and there is no ":" delimiter.

Make sure you're not using receive_override_options =

   -- Noel Jones

   -- Noel Jones