0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

update mysql_transport_maps.cf - translate 'virtual' to ':'

This makes sure our internal/virtual domains aren't caught in other transport map/nexthop

I needed this to safely implement transport rules like .fr => relay:[smtp.relay.com] without smashing our internal domains

So found out that transparent transport was ':' but took me a wile, so thought I could share.
This commit is contained in:
Antony 2022-03-07 23:13:39 -04:00 committed by GitHub
parent 71199fd0cb
commit c11f014e7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,8 +125,9 @@ user = postfix
password = password
hosts = localhost
dbname = postfix
query = SELECT transport FROM domain WHERE domain='%s' AND active = '1' AND transport != 'virtual'
#query = SELECT transport FROM domain WHERE domain='%s' AND active = '1' AND transport != 'virtual'
# Enforce virtual transport (catches internal virtual domains and avoid mails being lost in other transport maps)
query = SELECT REPLACE(transport, 'virtual', ':') AS transport FROM domain WHERE domain='%s' AND active = '1'
(See above note re Concat + PostgreSQL)