oftl--- via Postfix-users: > On Mon, Jul 14, 2025 at 06:01:20PM +1000, Viktor Dukhovni via Postfix-users > wrote: > > 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. > > Looks very interesting. But unfortunately there's no regexp support available. > And the installations of postfix and OS are quite old. Old enough, so that i > seriously do not want to touch it as long as the (currently dying) hardware > works.
This could also be done with a regexp: table. This use case does not require PCRE's expressiveness and speed. main.cf: regexp = regexp:${config_directory}/ recipient_bcc_maps = ${regexp}rcpt-bcc.regexp bcc_generic_maps = ${regexp}bcc-generic.regexp transport: bcc.invalid bcc:[other.host.example] master.cf: bcc unix - - n - - smtp -o { smtp_generic_maps = $bcc_generic_maps } rcpt-bcc.regexp: /^"(.*)"@(.*)$/ "rcpt-bcc-${1}=${2}"@bcc.invalid /^(.*)@(.*)$/ rcpt-bcc-${1}=${2}@bcc.invalid bcc-generic.regexp: /^"rcpt-bcc-(.*)=(.*)"@bcc\.invalid$/ "${1}"@${2} /^rcpt-bcc-(.*)=(.*)@bcc\.invalid$/ ${1}@${2} Verified with postmap -q - 'pipemap:{regexp:rcpt-bcc.regexp,regexp:bcc-generic.regexp}' for quoted and unquoted localparts. Wietse Wietse _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org