Re: [exim] same domain router to different servers

Top Page
Delete this message
Reply to this message
Author: Peter Bowyer
Date:  
To: exim-users
Subject: Re: [exim] same domain router to different servers
JupiterHost.Net wrote:

>
>
> Stephen Gran wrote:
>
>> On Wed, Dec 08, 2004 at 11:38:04AM -0600, JupiterHost.Net said:
>>
>>> JupiterHost.Net wrote:
>>>
>>>> Hello group,
>>>>
>>>> In the interest of "spreading" the wealth I was wondering if this
>>>> is possible:
>>>>
>>>> Could you have 2 (or more) exim servers that handle mail for the
>>>> smae domain *AND* each one handles certain accounts?
>>>>
>>>> For instance:
>>>>
>>>> foo.com
>>>>
>>>> server 1:
>>>> user1@???
>>>> user2@???
>>>>
>>>> server 2:
>>>> fred@???
>>>> joe@???
>>>>
>>>> When mail is sent to fred@??? it goes to server 2 and if server
>>>> 1 receives it, it will forward it to server 1 for handling?
>>>
>>>
>>> Wow let me try that again :)
>>>
>>> When mail is sent to fred@??? it will go to server 2.
>>> If server 1 by chance gets it then it will forward it to server 2
>>> for handling.
>>>
>>> There hope thats easier to understand ;p
>>
>>
>>
>> It sounds good, except that you're not really lightening the load in
>> this case - both servers will still process everybody's mail, and still
>> deliver it, just not to their mailbox, necessarily.
>
>
> Yeah, I was looking for a disk space saver idea ;p but you're right
> the load would not be less necessarily...
>
>> If you're looking to lighten the load for tasks like pop/imap, move the
>> deliveries to one of several back end machines that only receive the
>> email and deliver to mailboxes. You can use LDAP+perdition to scale
>> decisions about which machine the mail for an individual user goes to in
>> order to scale the backend, if need be.
>
>
> Yes that is what I'm looking for ;p
>
> So there's no way to make exim look at the recipient and fire it off
> to another server?
>

There are plenty of ways - here's one using a 'manualroute' router which
goes ahead of the local delivery router on each server:

routethedomain:
driver = manualroute
domains = my.domain.com
local_parts = lsearch;/path/to/file
transport = remote_smtp
route_data = $local_part_data
self = pass

and your file has addresses in the form

fred: server1
bert: server1
joe: server2

Check the docs for more stuff you can do with manualroute