Re: [Exim] Problems configuring Exim 4.10 routers.

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Joe Golden
CC: exim-users
Subject: Re: [Exim] Problems configuring Exim 4.10 routers.
On 30 Jul 2002, Joe Golden wrote:

> Phil wrote on 30 Jul 2002


[complete requote omitted]

> OK, I can understand. Let me better explain. We are running NIS, with
> server B as the master NIS server. I have exim setup to check aliases
> from the NIS mail.aliases db. The aliases are set as this;
> user@serverB
> user@serverC
> Now would it matter that they are all under domain kgo.csc.com? You see
> we really have no distinction between the UNIX side and the Lotus notes
> side, they fall under the one domain kgo.csc.com.


That shouldn't be a problem.

> This setup when exim receives mail routed to user@???,
> theoretically should call the NIS aliases and see where user is at,
> if user@serverB then should route to Server B for local delivery.
> if user@serverC then it should route to Server C for local delivery.


That sounds fine.

> So in essence I should be able to use the condition for both routers and
> that should fix my problem.


Yes, exactly. The condition will be quite complicated. For convenience,
it might be easier to define the NIS lookup using a macro at the start
of your Exim config, like this:

NISLOOKUP = ${lookup {$local_part} nis {nis.map.name}}

Let's suppose that serverB's name is server.b.com. Then you could use a
condition like this

condition = ${if match {NISLOOKUP}{\N@server\.b\.com$\N}{yes}{no}}

and a similar one for serverC. The magic string "@server\.b\.com$" is a
regular expression that matches any string ending in "@server.b.com". It
is wrapped in \N...\N to stop the backslashes and dollar from being
interpreted by the string expander.

If the lookup fails, it will return an empty string that doesn't match,
so neither router will run, and the address will bounce.

> Now would I still need the Hub_Route router
> still in there to relay to Server C?


No.

> I am taking today off.


Enjoy.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.