Posted inpostfix
Postfix Bind Sender Domain To Dedicated Outgoing IP Address
Recently there have been requests for sending mail with source IP addresses that depend on the envelope sender, it’s very usefull to protect IP-based domain reputations of different customers.
New Feature in postfix postfix-2.7-20091209 is sender_dependent_default_transport_maps
sender_dependent_default_transport_maps (default: empty) A sender-dependent override for the global default_transport parameter setting. The tables are searched by the envelope sender address and @domain. A lookup result of DUNNO terminates the search without overriding the global default_transport parameter setting. This information is overruled with the transport(5) table. Note: this overrides default_transport, not transport_maps, and therefore the expected syntax is that of default_transport. This feature does not support the transport_maps syntax for null transport, null nexthop, or null email addresses. For safety reasons, this feature does not allow $number substitutions in regular expression maps. This feature is available in Postfix 2.7 and later.
Create file called sdd_transport_maps.regexp:
/@customer1-dom\.tld$/ customer1: /@customer2-dom\.tld$/ customer2: /@customer3-dom\.tld$/ customer3: ..... next .....