postfix-users January 2011 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: "Sorting" mail between different se

Re: "Sorting" mail between different servers?

From: Victor Duchovni <Victor.Duchovni_at_nospam>
Date: Mon Jan 10 2011 - 14:36:12 GMT
To: postfix-users@postfix.org

On Sat, Jan 08, 2011 at 07:53:58PM +0000, Jan Johansson wrote:

> >/etc/postfix/transport:
> > someuser@example.com smtp:[172.31.254.160]
> > otheruser@example.com smtp:[172.31.254.150]
> >
> ># postmap /etc/postfix/transports
> ># postfix reload
>
>
> Thanks. I got the answer a bit earlier on the list. I was under the (incorrect) impression that transport only worked on domain level.

It is best used that way, especially if per-user lookups involve LDAP,
MySQL or similar. A more complex, but more performant solution is to
rewrite each type of user to a suitable domain that is routed to the
right place. Then, if absolutely necessary use smtp_generic_maps to
rewrite back to the original address during SMTP delivery, but better
to have each destination accept non-public internal "route" addresses.

-- Viktor.