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

Página Inicial
Delete this message
Reply to this message
Autor: Adam D. Barratt
Data:  
Para: exim-users
Assunto: Re: [exim] Send mail to specific domains via smart host
On Fri, 2019-03-08 at 22:14 +0000, Jasen Betts via Exim-users wrote:
>     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

>
> yahoo are tricky, they cover many domains, but I guess if you
> redirect the bulk theough your provider the remainder can pass viar
> direct smtp and be under the rate-limit.
>
> If I wanted to gatch more yahoo traffic I'd leave the domains
> restriction off and used an inverted ignore_target_hosts list with
> the IP addresses of the yahoo and aol MXs 
>
> I's create a file called 
>
> /etc/exim4/conf.d/routers/175_local_yahoo_warmup
>
> with 
>
> NOT_YAHOO_MXEN= !98.137.159.0/24 : !66.218.85/24 : !67.195.229.0/24 :
> !74.6.137/24
>         
>        dns_yahoo_aol:
>          debug_print = "R: dnslookup_yahoo_aol for
> $local_part@$domain"
>          driver = dnslookup
>      ignore_target_hosts = NOT_YAHOO_MXEN
>          transport = remote_smtp_smarthost
>          route_list = * mx.localrelay.com byname
>          same_domain_copy_routing =


Rather than a) hard-coding a list and b) ignoring a negated list, might
I suggest something more like:

domainlist avoid_oath_mxes = *.yahoodns.net

dns_yahoo_aol:
    debug_print = "R: dnslookup_yahoo_aol for $local_part@$domain"
    driver = dnslookup
    condition = ${if forany{${lookup dnsdb{>: mxh=$domain}}}{match_domain{$item}{+avoid_oath_mxes}}}
    transport = remote_smtp_smarthost
    route_list = * mx.localrelay.com byname

Regards,

Adam