On Sun, Jul 13, 2025 at 09:12:28PM +0200, oftl--- via Postfix-users wrote:
> Have an already up and running postfix *also* relay everything to another
> postfix.
Yes, via an envelope-recipient preserving PCRE recipient Bcc table, and
helper machinery to route and unmunge the addresses.
main.cf:
pcre = pcre:${config_directory}/
recipient_bcc_maps = ${pcre}rcpt-bcc.pcre
bcc_generic_maps = ${pcre}bcc-generic.pcre
transport:
bcc.invalid bcc:[other.host.example]
master.cf:
bcc unix - - n - - smtp
-o { smtp_generic_maps = $bcc_generic_maps }
rcpt-bcc.pcre:
/^"(.*)"@(.*)$/ "rcpt-bcc-${1}=${2}"@bcc.invalid
/^(.*)@(.*)$/ rcpt-bcc-${1}=${2}@bcc.invalid
bcc-generic.pcre:
/^"rcpt-bcc-(.*)=(.*)"@bcc\.invalid$/ "${1}"@${2}
/^rcpt-bcc-(.*)=(.*)@bcc\.invalid$/ ${1}@${2}
--
Viktor.
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]