On 1/20/2011 10:48 AM, Andrea Scarso wrote:
Don't use FILTER for mail routing; it affects all recipients of a message.
Do use transport_maps entries to direct specific recipients to the correct
mail server.
# transport_maps
example.com smtp:[IP1]
u...@example.com smtp:[IP2]
I tried, but I have to know all addresses.
Or is it possible to use wildcards?
I should use:
example.com smtp:[IP1]
*.t...@example.com smtp:[IP2]
But it seems not to work.
You can use a regexp table for transport_maps.
main.cf:
transport_maps = regexp:/etc/postfix/transport.regexp
# transport.regexp
# order matters; put more specific entries first
/\.town@example\.com$/ smtp:[IP1]
/@example\.com$/ smtp:[IP2]
Postfix won't automatically recognize changes to the regexp
table, so run "postfix reload" after editing the file.
-- Noel Jones