----- Message from Viktor Dukhovni via Postfix-users <[email protected]> ---------
    Date: Mon, 8 Jan 2024 12:40:49 -0500
    From: Viktor Dukhovni via Postfix-users <[email protected]>
Reply-To: [email protected], Viktor Dukhovni <[email protected]>
Subject: [pfx] Re: recipient_bcc_maps clarification.
      To: [email protected]

On Mon, Jan 08, 2024 at 10:24:15AM +0530, anant--- via Postfix-users wrote:

For specific 2 recipients of our domain, we don't want always_bcc to be
implemented.  ie. if a mail is addressed to [email protected]  (our domain only),
mail should not be Bcc to [email protected]. similarly if mail recipient is
[email protected] (our domain only), mail should not be Bcc to [email protected].  For
all others always_bcc to continue.

Suggested approach (this uses "inline" tables, but equivalent file-based
PCRE, or, in the case of the transport(5) table, hash or cdb tables also
work.

   main.cf:
       recipient_delimiter = +
       recipient_bcc_maps = pcre:{
           { /^"(.*)"@example\.com$$/  "bcc+$${1}"@example.com }
           { /^(.*)@example\.com$$/  bcc+$${1}@example.com }
           }
       transport_maps = inline:{
           { [email protected] = discard:silently }
           { [email protected] = discard:silently }
           }

The "$$" syntax is only needed for inline tables in main.cf, just a
single "$" is needed in  a file-based PCRE table

   rcpt-bcc.pcre:
       /^"(.*)"@example\.com$/  "bcc+${1}"@example.com
       /^(.*)@example\.com$/  bcc+${1}@example.com

--
   Viktor.
_______________________________________________
Postfix-users mailing list -- [email protected] unsubscribe send an email to [email protected]

----- End message from Viktor Dukhovni via Postfix-users <[email protected]> -----

Thank you all.



--
Anant S Athavale
------------------------------------------------------------------------------
Confidentiality Notice: This e-mail message, including any attachments, is for
the sole use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.
Website: https://www.ursc.gov.in
------------------------------------------------------------------------------

_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to