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

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 a...@xx.com  (our domain only),
mail should not be Bcc to zz...@xx.com. similarly if mail recipient is
d...@xx.com (our domain only), mail should not be Bcc to zz...@xx.com.  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:{
           { bcc+...@example.com = discard:silently }
           { bcc+...@example.com = 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 -- postfix-users@postfix.orgTo unsubscribe send an email to postfix-users-le...@postfix.org

----- End message from Viktor Dukhovni via Postfix-users <postfix-users@postfix.org> -----

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 -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to