Re: [exim] relaying for a domain

Top Page
Delete this message
Reply to this message
Author: Tony Finch
Date:  
To: Asif Aslam Chaudhry
CC: exim-users
Subject: Re: [exim] relaying for a domain
On Tue, 6 Jun 2006, Asif Aslam Chaudhry wrote:
>
> We are trying to use EXIM as a relay server for two domains xyz.com, and
> abc.com. The purpose is to filter out JUNK non-reciepient emails other
> then these 2 domains.
>
> Our relay server will face the outside world and we will forward all the
> relevant emails for xyz.com and abc.com to another SMTP server.
>
> please guide shall we use ACLs or the manual router entry for this task


Yes. You use the ACLs to decide what to accept and the routers to decide
where it should go.

In the default configuration, add this domain list:

    domainlist manualroute_domains = lsearch;/etc/exim/manualroutes


and add it to the local domains list:

    domainlist local_domains = @ : +manualroute_domains


This setup ensures that the default ACLs and dnslookup router will do the
right things. After the dnslookup router, you need to add:

    manualroute:
      driver = manualroute
      domains = +manualroute_domains
      route_data = $domain_data
      transport = smtp


Populate /etc/exim/manualroutes with entries like:

    xyz.com: mail.server.for.xyz.com
    abc.com: mail.server.for.abc.com


You probably also want a way to verify which local parts are valid in
these domains. The easiest way is to change the ACLs so that they say:

  accept  domains       = +local_domains
          endpass
          verify        = recipient/callout=use_sender,defer_ok


i.e. add the callout parameters.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}