Score:0

Postfix: recipient_bcc_maps for incoming mails only

bs flag

With the parameter recipient_bcc_maps in main.cf from Postfix it is possible to send incoming mails from a list of email addresses as a BCC copy to other email addresses.

I want to BCC copy only those incoming mails where the sender's domain can not be found in the list of virtual_mailbox_domains from main.cf. That means I don't want to send emails as a BCC copy where Postfix is the "home" server for those domains.

Is this possible?

Score:2
jp flag

It is possible to limit the recipient_bcc_maps only for inbound mail, which is actually the default behaviour...

The BCC address (multiple results are not supported) is added when mail enters from outside of Postfix.

...but not in a way you suggest here: there is no configuration parameter that would allow you to bind recipient_bcc_maps with virtual_mailbox_domains like that. What you could do is to configure this for the smtpd instance listening on port 25 for inbound mail, alone, in the master.cf:

smtp      inet  n       -       y       -       -       smtpd
  -o recipient_bcc_maps=hash:/etc/postfix/recipient_bcc

This way it won't affect your configuration for smtps (465) or submission (587) instances of the smtpd that are configured for accepting outbound mail from authenticated users.

p asst avatar
bs flag
Thank you for your suggestion. However, I don't think it will help me in our constellation. We use Kopano Groupware which uses postfix as MTA. In this respect there is no direct authentication of users to postfix, but to Kopano to send mails.
jp flag
What mechanism Kopano uses to communicate with Postfix? Could Kopano authenticate against Postfix or at least use, e.g., `localhost:465`, which would enable separate Postfix configuration for inbound mail?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.