Gioele Pannetto via Postfix-users:
> On 11/03/25 15:14, Bill Cole via Postfix-users wrote:
> 
> >> Sorry but in the first email you said that "automatic BCC recipients 
> >> are subject to virtual_alias_maps expansions"
> > Meaning: the OUTPUT of a BCC lookup is put through a virtual alias 
> > expansion.
> >
> >> and now you are saying that alias expansion is not used in BCC lookup.
> > No, he said the alias expansion happens AFTER BCC lookup. The output 
> > of a virtual alias expansion of a BCC lookup is NOT used for another 
> > BCC lookup
> 
> Okay thanks, It's starting to make sense.
> 
> I think that the only way of achieving what I'm trying to do it is to 
> BCC every email to another Postfix instance and then expanding again the 
> aliases there.
> 
> Thanks for your time.

There is no need for an extra Postfix instance.

You want, but this cannot work:

  recipient_bcc_maps
    # BCC expansion for the alias-expanded recipient
    user2@domain2.example user3@domain3.example

  virtual_alias_maps:
    # alias the recipient
    user1@domain1.example   user2@domain2.example
    # Add user2's BCC addreses
    user2@domain2.example   user3@domain3.example, user4@domain4.example

Instead do this:

  virtual_alias_maps:
    # alias the recipient
    user1@domain1.example   user2@domain2.example
    # Add user2's BCC addreses
    user2@domain2.example   user2@domain2.example, user3@domain3.example, 
user4@domain4.example

This will alias user1@domain1.example to user2@domain2.example,
AND ALSO BCC all mail for user2@domain2.example to user3@domain3.example
and user4@domain4.example.

The trick is in the second rule: to add multiple BCC addresses for
user2@domain2.example, list user2@domain2.example on both sides of
the virtual_alias_maps rule.

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to