Re: [exim] Exim as relay box between exchange servers.

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Peter Bowyer
Dátum:  
Címzett: Exim Users Mailing List
Tárgy: Re: [exim] Exim as relay box between exchange servers.
On Mon, 6 Dec 2004 12:43:53 +1100, Michael Bonnice
<michael.bonnice@???> wrote:
> Hi,
>
> Im quite new to exim but really need to solve this problem using it.
> I currently have a situation where I have two exchange servers, one 2003
> running on a SBS server and another 5.5 on an NT box. The 5.5 will be
> upgraded to 2003 shortly on a full dc (not sbs).
>
> However, the two servers belong to two different entities but both need to
> share the same domain name. So what I have is a copy of Suse Pro 9.2 on a
> box with exim loaded. I have a LDAP script which generates a list of email
> addresses from each of the servers and puts them into two seperate files.
> What I would like is a filter of some sort written to say - if the username
> exists in this file then relay the email to this exchange server.
>
> I dont want to do LDAP queries on the fly. All I need a some sort of filter
> where it just checks each file and relays mail to the appropriate exhange
> server according to which file the email address exists in.


Not too hard - the simplest way would probably with 2 manualroute
routers, a bit like this - I assume the 2 files just have local parts
in.

exchangeserver1:
driver = manualroute
domains = the.domain.youre.handling
local_parts = lsearch;/path/to/file1
route_data = host.name.of.server1
transport = remote_smtp

exchangeserver2:
driver = manualroute
domains = the.domain.youre.handling
local_parts = lsearch;/path/to/file2
route_data = host.name.of.server2
transport = remote_smtp

These routers go at the top of your router chain, or at least, ahead
of anything else which might 'catch' the domain in question.

Check the online docs for more smart things you can do with manualroute -
http://www.exim.org/exim-html-4.40/doc/html/spec_20.html#IX1688

Peter