On Thu, Jan 25, 2024 at 12:04:38PM +0000, hawky--- via Postfix-users wrote:
> we're in the process to integrate SpamAssassin in our mail system. We
> decided to use the after-queue attempt with
>
> > smtpd -o content_filter=
> The problem we're facing right now is that pipe is getting the alias
> name as recipient instead of the username - both are the same:
You probably have "receive_override_options = no_address_mappings" or
similar configured in the before-queue smtpd.
> mydestination = hexa, localhost.localdomain, localhost $myhostname
>
> --master.cf--
> 192.168.73.200:25 inet n - y - - smtpd -v
> -o content_filter=spamassassin
> -o receive_override_options=no_address_mappings
There you are.
> pickup unix n - y 60 1 pickup
> spamassassin unix - n n - - pipe -v
> user=debian-spamd argv=/usr/bin/spamc -u ${recipient} -f -e
> /usr/sbin/sendmail -oi -f ${sender} ${recipient}
For efficiency, most users use the "advanced" SMTP-based content filter,
rather than the "simple" pipe-based filter.
- Are you expected exactly one recipient per-invocation of the
spamassassin filter? I'm not sure how spamc handles multiple
recipients after "-u".
- You're missing the "--" before ${recipient}, relying only on
"allow_min_user = no" to protect the sendmail(1) command-line
from option argument injection.
--
Viktor.
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]