Magnus B?ck: > On Thursday, November 19, 2009 at 20:01 CET, > Osmany Goderich Navarro <osm...@oc.quimefa.cu> wrote: > > > I have a Postfix+Dovecot+MySQL configuration. I want postfix to bcc > > messages coming from a specific address to a specific domain. I have > > currently hosting three virtual domains. > > I have tried to use sender_bcc_maps to do this, but this only copies > > the messages to certain users regardless of what domain the message > > was meant to go. Can anyone please help me find out how to tell > > sender_bcc only to work for one specific domain? > > Postfix does not support this natively. You need to use either > sender_bcc_maps or recipient_bcc_maps and send the messages to a filter > or similar that applies the second domain restriction and only passes > a subset of the messages. If the bcc'd messages are being delivered > locally you should be able to use a delivery agent like procmail to > do this.
I was going to suggest using a policy daemon that responds with a BCC action, because that is a more natural way to make decisions based on sender and recipient, but I find that the BCC access map action is not marked as "ready for stable release". Perhaps this is because people would expect BCC action support in the header/body_checks, too? That was definitely not possible before I added support to add/modify envelopes with Milter applications. Otherwise, the access map code for BCC is a direct rip-off of the code for the FILTER action, so I see no real objection to calling the BCC access map action "stable". Wietse