Re: [exim] Send mail to specific domains via smart host

Top Page
Delete this message
Reply to this message
Author: Rory Campbell-Lange
Date:  
To: exim-users
Subject: Re: [exim] Send mail to specific domains via smart host
On 06/03/19, Heiko Schlittermann via Exim-users (exim-users@???) wrote:
> Hi Rory,
>
> Rory Campbell-Lange via Exim-users <exim-users@???> (Mi 06 Mär 2019 22:43:00 CET):
> >
> >       dns_yahoo_aol:
> >         debug_print = "R: dnslookup_yahoo_aol for $local_part@$domain"
> >         driver = dnslookup
> >         domains = aol.com : yahoo.com
> >         transport = remote_smtp_smarthost
> >       route_list = mx.localrelay.com byname
> >         same_domain_copy_routing = yes
> >         no_more

>
> Not route_list, as this expects semicolon olon seperated list of items:
>
>     <domain> <relayhost>[:<relayhost>]… <options>; …

>
> While you could use this as:
>
>     route_list = * mx.localrelay.com

>
> the route_data options is possible too:
>
>     route_data = mx.localrelay.com

>
> (The advantage of route_data is, that the rhs gets expanded at runtime,
> so it can be anything, from literal data (as in the example here) to
> database lookups or whatever)
>
> > The normal Debian exim4 config has
> >
> >       route_list = * DCsmarthost byname
> >       and
> >       host_find_failed = ignore

>
> I'm not very familiar with the Debian config schema, but I think,
> you need to define a smarthost, to get this router included in the final
> config. But this would be the smarthost for all of your domains then.


Hi Heiko

Thanks very much indeed for your response.

I added in a router block based on your advice and the Debian example:

    dns_custom:
      debug_print = "R: dnslookup_custom for $local_part@$domain"
      driver = manualroute
      domains = <domain1> : <domain2> : <etc>
      transport = remote_smtp_smarthost
      route_list = * my.relay.com byname
      host_find_failed = ignore
      same_domain_copy_routing = yes
      no_more


I'll read up more about route_data. Thanks for the note about that.

The remote_smtp_smarthost transport already exists in the Debian config, so I
just reused that.

It seems to be running well using 'exim4 -bt <address_to_test>' and my backlog
has cleared.

Many thanks again for your comments
Rory