Skip to content

Commit

Permalink
update mysql_transport_maps.cf - translate 'virtual' to ':'
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cantoute authored Mar 8, 2022
1 parent 71199fd commit c11f014
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions DOCUMENTS/POSTFIX_CONF.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c11f014

Please sign in to comment.