Re: [Exim] Mail hub (exim 3.34)

Top Page
Delete this message
Reply to this message
Author: Steve Haslam
Date:  
To: 'exim-users@exim.org'
Subject: Re: [Exim] Mail hub (exim 3.34)
<-- Warning: charset 'unknown-8bit' is not supported -->

On Fri, Nov 08, 2002 at 01:42:05PM -0000, Timothy Arnold wrote:
> In local_domains we have:
>
> local_domains = ngfl.gov.uk : vtc.org.uk
>
> And in relay_domains
>
> relay_domains = ngfl.gov.uk : vtc.org.uk
>
> I don't think that the above is right - the previous sysadmin did very
> little documentation. From the exim docs, it appears that local_domains is
> read first, so relay_domains has no effect for ngfl.gov.uk or vtc.org.uk?


Right-- if the domain is in local_domains, it will be accepted for any
sender anyway. relay_domains is for domains you want to accept mail from for
any sender, but you want it to be processed for delivery by the routers as
if it were an external domain, not the directors.

> So, now I want to route 'testforum.ngfl.gov.uk' to our internal mailserver -
> pinter.ngfl.gov.uk.
>
> How does one go about this?


Add the domains to relay_domains to allow them to be accepted, and create a
router for routing to internal mail servers, viz.:

pinter:
driver = domainlist
transport = remote_smtp
route_list = "testforum.ngfl.gov.uk pinter.ngfl.gov.uk bydns_a"

This is the most basic way of doing it. You should then see that if you test
with "exim -bt foo@???" that the mail is routed by a
router called "pinter" to pinter.ngfl.gov.uk.

Getting more advanced, you might want to add more domains to be routed
through the internal mail server without editing exim.conf each time.
Remember that each domain would need to be added twice: in relay_domains and
in the "pinter" router. An alternative is to list the domains you wish to
route to pinter in a file (e.g. /etc/exim/pinter_domains) and write this:

relay_domains = /etc/exim/pinter_domains

and modify the router like this:

pinter:
driver = domainlist
transport = remote_smtp
domains = /etc/exim/pinter_domains
route_list = "* pinter.ngfl.gov.uk bydns_a"

which should have the same effect, although we've now moved checking the
domain name to the "domains" keyword, and told the router to route
everything that passes that test to pinter.

Finally, you could extend this to use lookups, and hence store the list of
domains in a DBM file, or on an LDAP or SQL server, and perhaps allow
configuration of internal domains to different internal mail servers.

HTH

SRH
--
Steve Haslam      Reading, UK                           araqnid@???
Debian GNU/Linux Maintainer                               araqnid@???
                     Currently for sale: http://www.arise.demon.co.uk/my_cv/
almost called it today, turned to face the void, numb with the suffering
and the question- "Why am I?"                                  [queensr?che]