bcc message rule

KatyComputer

Well-Known Member
Sep 26, 2019
195
16
58
62
St Louis
katycomputer.com
Several clients bcc incoming and outgoing email to their gmail account. It works well, however Google won't accept messages bcc'd from notification@facebookmail.com.

I want to deliver these messages to the client without copying the messages to gmail. So I need some way to bcc gmail unless the message originates from facebookmail.

Anyone have a clever solution for this one?

I am using Postfix's sender_bcc_maps & recipient_bcc_maps directives to accomplish the bcc function.
 
Hmm - you could change to the rule-system instead of postfix:
* higher priority rule (e.g. prio: 97):
** From notification@facebookmail.com
** To <WhoObjectOfBCCUsers>
** Action: Accept
* lower priority rule (e.g. prio: 96)
** To <WhoObjectOfBCCUsers>
** Action: BCC gmail (there would probably need to be one rule per user)
** Action: Accept


As an alternative you could take a look at the 'sender_dependent_transport_maps' (and forward mail from facebook to a special smtpd-instance (configured in master.cf ) , which does not BCC) - haven't tested that - but seems promising

EDIT: added the sender_dependent_transport_maps option

I hope that helps!
 
Last edited:
  • Like
Reactions: KatyComputer