In config, I've defined allowed relay_domains

        /main.cf
                ...
                relay_domains = DDDD1.com
                                DDDD2.com
                                ...
                                DDDDn.com

and also use

                transport_maps=lmdb:/usr/local/etc/postfix/tranports

where currently, each relay domain is 

                /transports
                        ...
                        DDDD2.com    relay-vpn:[internal.DDDD.com]:12345
                        DDDD1.com    relay-vpn:[internal.DDDD.com]:12345
                        ...
                        DDDDn.com    relay-vpn:[internal.DDDD.com]:12345
                        ...

Can the relay_domains array itself be correctly used as a lookup in a lookup 
table?

I'd 1st guess that some form of regex table could be amenable, in effect

                /transports.pcre
                        ...
                        /$relay_domains/  relay-vpn:[internal.DDDD.com]:12345
                        ...

?

Reading

        http://www.postfix.org/regexp_table.5.html
        http://www.postfix.org/postmap.1.html
        http://www.postfix.org/pcre_table.5.html

body patterns can certainly be referenced as match variables ( ${1}, ${2}, etc 
), but I've so far missed any mention of use of main.cf data.

Of course there are other ways at this ... putting the relay_domains in an SQL 
DB, and using an SQL lookup , etc.

The reference to 'flatfile' main.cf's data would simply be, in this case, 
convenient.

Reply via email to