Dnia  5.12.2024 o godz. 19:02:26 Tomasz Pala via Postfix-users pisze:
> 
> O[office] -> B,X,Y,Z,S1,S2
> X[empl01] -> B,X,Y,Z,S1,S2
> Y[empl02] -> B,X,Y,Z,S1,S2
> Z[empl03] -> B,X,Y,Z,S1,S2
> S1[sup01] -> B,S1
> S2[sup02] -> B,S2
> 
> where Sn are in a form of sn+off...@example.net.
> 
> > Scenario 1: When someone sends mail to "off...@example.net", what should
> > happen to that mail? Where should it be delivered?
> 
> To:
> - several personal accounts (X,Y,Z),
> - more personal accounts, but with +office expansion (Sn+office),
> - backup account (B).
> Let's call this DS (destination SET). In terms of symbols above:
> {B,X,Y,Z,S1+office,S2+office}
> 
> > Scenario 2: If an employee responds to a mail sent to "off...@example.net",
> > what should happen to that mail?
> 
> It should be BCC-ed into what's expanded from off...@example.net, i.e.
> "destination SET".
> 
> > Scenario 3: If one of the employees emails some other employee - *not*
> > responding to a mail sent to "off...@example.net", what should happen to
> > that mail?
> 
> The same - BCC into "destination SET" (of off...@example.net).
> 
> > Scenario 4: If one of the employees emails any other address (outside of the
> > company) - *not* responding to a mail sent to "off...@example.net", what
> > should happen to that mail?
> 
> The same - BCC into "destination SET" (of off...@example.net).


>From what you have written I understand that in most (if not all) cases,
each email has to be BCC-ed to "destination set", which consists of
{B,X,Y,Z,S1+office,S2+office}. Only emails to S1 and S2 don't, they are
BCC-ed only to B. Do I understand correctly?

So maybe you should try to use "recipient_bcc_maps" parameter for this,
without the need for too much aliasing?

I think that recipient_bcc_maps for each of O,X,Y,Z can be the above
"destination set", while the recipient_bcc_maps for S1,S2 would be just B.
Probably O should be then aliased to something like /dev/null, as there is
no actual recipient and all recipients are handled by BCC.

If I understand the documentation correctly
( http://www.postfix.org/postconf.5.html#recipient_bcc_maps ),
bcc_recipient_maps is applied only once, and the recipients mentioned there
don't get another copy of the same message ("To avoid mailer loops,
automatic BCC recipients are not generated after Postfix forwards mail
internally, or after Postfix generates mail itself.")

Can it solve your case?
-- 
Regards,
   Jaroslaw Rafa
   r...@rafa.eu.org
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to