Discussion:
Transport_maps per sender domain or SQL statement for both sender and recipient?
(too old to reply)
m***@gmail.com
2017-02-18 12:40:45 UTC
Permalink
We have the following situation:
Postfix server(s) has to relay mail from 6 different mail domains to the internet.
Almost all mail is send to the internet directly but we also use transport_maps in a mysql table with about 2000 domains for we have special connections, and we use transport_maps to define the route back to the senders (internal) mailservers.
This works fine.

Now we want some of the 6 sender domains not to use the (SQL) transport_maps because they are not allowed to use these connections (secure lines).
I tried to replace transport_maps with default_transport and sender_dependent_default_transport_maps, but that doesn't work (all mail will be delivered to the internet). It should be easy when the SQL query could use both sender and recipient as look-up key but I don't see how to accomplish that.
Is it possible to define different transport destination domains (like tranport_maps) for different senders?
m***@gmail.com
2017-02-20 18:07:21 UTC
Permalink
Post by m***@gmail.com
Postfix server(s) has to relay mail from 6 different mail domains to the internet.
Almost all mail is send to the internet directly but we also use transport_maps in a mysql table with about 2000 domains for we have special connections, and we use transport_maps to define the route back to the senders (internal) mailservers.
This works fine.
Now we want some of the 6 sender domains not to use the (SQL) transport_maps because they are not allowed to use these connections (secure lines).
I tried to replace transport_maps with default_transport and sender_dependent_default_transport_maps, but that doesn't work (all mail will be delivered to the internet). It should be easy when the SQL query could use both sender and recipient as look-up key but I don't see how to accomplish that.
Is it possible to define different transport destination domains (like tranport_maps) for different senders?
Learned about postmulti this weekend.
That did the trick.
Although I think this is way to much overhead for such a simple question.
We have both the sender and recipient so we could make a nice SQL query if only Postfix offered these values like %s for sender and %r for recipient.
Loading...