Simon Effenberg: > On Sat, 9 Nov 2013 07:54:30 -0500 (EST) > wie...@porcupine.org (Wietse Venema) wrote: > > > transport_maps can use hash tables AND tcp tables. transport_maps > > queries each table in the specified order, and stops when a result > > is found. When no result is found, Postfix uses default_transport. > > > > Wietse- > > > I got this but so it's impossible to do something like that: > > main.cf: > transport_maps = hash:/etc/postfix/transport, tcp:[127.0.0.1]:2527 > > transport: > > @domain1.tld smtp:[internal.relay] > @domain2.tld smtp:[external.relay]
If you want to send domain1.tld and domain2.tld to the internal relay, then the correct syntax for a hash: map would be: domain1.tld smtp:[internal.relay] domain2.tld smtp:[external.relay] > master.cf: > 127.0.0.1:2527 inet n n n - 0 spawn > user=nobody argv=/etc/postfix/random.rb > > random.rb: > #!/usr/bin/env ruby > > TRANSPORTS = [ 'smtp1:', 'smtp2:', 'smtp3:' ] > > while line = STDIN.readline > puts "200 #{TRANSPORTS[rand(TRANSPORTS.size)]}" > end That randomly produces "smtp1:", "smtp2:", or "smtp3:" as response. Wietse