Skip to content

Commit c11f014

Browse files
authored
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.
1 parent 71199fd commit c11f014

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

DOCUMENTS/POSTFIX_CONF.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ user = postfix
125125
password = password
126126
hosts = localhost
127127
dbname = postfix
128-
query = SELECT transport FROM domain WHERE domain='%s' AND active = '1' AND transport != 'virtual'
129-
128+
#query = SELECT transport FROM domain WHERE domain='%s' AND active = '1' AND transport != 'virtual'
129+
# Enforce virtual transport (catches internal virtual domains and avoid mails being lost in other transport maps)
130+
query = SELECT REPLACE(transport, 'virtual', ':') AS transport FROM domain WHERE domain='%s' AND active = '1'
130131
131132
(See above note re Concat + PostgreSQL)
132133

0 commit comments

Comments
 (0)