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?

Here's my whole master.cf file:

smtp     inet  n     -     y     -     -        smtpd
     -o content_filter=spamassassin
     -o receive_override_options=no_address_mappings

submission inet  n     -     y     -     -        smtpd
#  -o content_filter=spamassassin
#  -o receive_override_options=no_address_mappings
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_tls_auth_only=yes

#628       inet  n       -       y       -       -       qmqpd
pickup    unix  n       -       y       60      1       pickup
cleanup   unix  n       -       y       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       y       1000?   1       tlsmgr
rewrite   unix  -       -       y       -       -       trivial-rewrite
bounce    unix  -       -       y       -       0       bounce
defer     unix  -       -       y       -       0       bounce
trace     unix  -       -       y       -       0       bounce
verify    unix  -       -       y       -       1       verify
flush     unix  n       -       y       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       y       -       -       smtp
relay     unix  -       -       y       -       -       smtp
        -o syslog_name=postfix/$service_name
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       y       -       -       showq
error     unix  -       -       y       -       -       error
retry     unix  -       -       y       -       -       error
discard   unix  -       -       y       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       y       -       -       lmtp
anvil     unix  -       -       y       -       1       anvil
scache    unix  -       -       y       -       1       scache
postlog   unix-dgram n  -       n       -       1       postlogd

maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}

spamassassin unix -     n       n       -       -       pipe
user=debian-spamd argv=/usr/bin/spamc -u ${user} -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}

policyd-spf  unix  -       n       n       -       0       spawn
     user=policyd-spf argv=/usr/bin/policyd-spf

Reply via email to