Il 21 ago 2016 1:20 AM, "Wietse Venema" <wie...@porcupine.org> ha scritto: > $ man 5 postconf | less '+/sender_dependent_default_transport_maps' > ... > This information is overruled with the transport(5) table. > ... > > transport_maps has precedence over sender_dependent_default_transport_maps > because transport_maps also has precedence over default_transport. >
Thanks you Wietse for the clarification > If you use sender-dependent routing, you can't use transport_maps. > You can still use default_transport, relay_transport, local_transport > and virtual_transport, for routing domains. What I want to accomplish is the following 1) if sender is @domain1.com relay via smtp:[relay.domain1.com] 2) otherwise round robin delivery from one of my IP via smtp (services configured in master.cf with differente ehlo and bound to different IP) (found on stack overflow, but now I can't retrieve the post) I tried as follows sender_dependent_default_transport_maps = hash:/etc/postfix/sender_relay, mysql:/etc/postfix/transport_roundrobin.cf sender_relay @domain1.com smtp:[relay.domain1.com]:587 # (tried with and without leading smtp) transport_roundrobin.cf query = SELECT transport from transport_roundrobin ORDER BY RAND() LIMIT 1 transport_roundrobin is a mysql table with a single column containing service name as defined in master.cf (out1, out2, out3) I think that when the sender is f...@domain1.com the hashmap should apply and thus no query to mysql had to be performed, but the query is always performed and the th delivery is chosen from the one's defined inside the table If I remove the mysql part (sender_dependent_default_transport_maps = hash:/etc/postfix/sender_relay) mail from u...@domain1.com get relayed correctly, other mail go to default smtp Is my goal achievable and I'm worng at the configuration? It's a bad idea? Thanks Andrea