Re: Gateway MX with multiple backend servers
- On Thu, Dec 27, 2007 at 05:10:21PM -0800, Jay Chandler wrote:
> >Either virtual_alias_maps (better) or transport_maps (OK if sources areTrue for transport(5) lookups. For virtual(5) lookups the picture is
> >*reliable* and not slow) can list multiple sources of data:
> > virtual_alias_maps = mysql:this.cf, ldap:that.cf, ...
> > # transport_maps = mysql:this.cf, ldap:that.cf, ...
> >Arrange for valid users to be rewritten to (often virtual alias domain) or
> >routed to (typically relay domain) the correct destination.
> Okay-- I understand the first part, but not the second.
more complex because the result of any lookup is subjected recursively
to more lookups until no match is found or an identity mapping is reached.
The recursive lookup again starts with the first table, so in practice the
highest priority table wins, unless the results of lookups in the first
table are only found as keys in the second table.
> I assume thatTypically true, but understand the impact of recursion with virtual(5)
> the mail gateway will accept the "first match" it finds in your
> example-- in other words, if the user exists in the first DB it queries,
> it won't query the second DB; this is important as all the users on the
> first system will also exist on the second.
lookups. If the RHS domain is not any of the tables, the issue is moot,
otherwise some more thought is required to make sure that recursion
works as expected (it usually does, but make sure you know why).
> What I'm concerned with is how to properly rewrite the envelope headersThere is no such thing as "envelope header". There are envelope addresses,
> to direct each recipient's mail to the proper server; the logic would be:
message headers and message body.
> if user is found in the LDAP database, deliver to server1.company.comhttp://www.postfix.org/ADDRESS_REWRITING_README.html
> elseif user is found in MYSQL database, deliver to server2.company.com
> else REJECT.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.