Steve Dondley:
> > By doing the virtual_alias_maps *before* instead of after the content
> > filter, so that the content filter sees the final envelope recipient.
> > This is done by by NOT having ("receive_override_options" with
> > "no_address_mappings") before the content filter and by having
> > ("receive_override_options" with "no_address_mappings") after the
> > content filter. See http://www.postfix.org/FILTER_README.html for
> > a few examples.
> >
> > Wietse
>
> Thanks Wietse. So I already had this in my master.cf file:
>
> smtp inet n - y - - smtpd
> -o content_filter=spamassassin
> -o receive_override_options=no_address_mappings
>
> So it looks like I have the no_address_mappings after the content filter
> already. Is that right?
No. As Matthias pointed out, these are the settings before the content
filter (hint: it is before spamassassin).
Unfortunately, your configuration uses the /usr/sbin/sendmail command
to inject filtered mail back into Postfix. That uses the same Postfix
pickup service for new mail and for filtered mail. Therefore if you
turn off virtual alias expansion afer the content filter, then you
turn off virtual alias expansion for all mail received with the
/usr/sbin/sendmail command.
Instead I recommend that you use an approach that uses SMTP to
reinject mail back into Postfix. Thgis gives finer control over the
receive_override_options setting. See, for example,
http://www.postfix.org/FILTER_README.html.
Wietse