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: Jasen Betts
CC: exim-users
Subject: Re: [exim] Send mail to specific domains via smart host
On 08/03/19, Jasen Betts via Exim-users (exim-users@???) wrote:
> > We're using a simple setup using Debian's packaged configurations which
> > I guess we will need to tweak.
>
> What you do is select split configuration, then you can insert
> configuration without debian's config management messing with
> it.
>
> >     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 =

>
> then re-run sudo dpkg exim4-config and choose "split configuration" (into
> many small files)
>
> > The normal Debian exim4 config has
> >
> >     route_list = * DCsmarthost byname
> >     and
> >     host_find_failed = ignore

> >
> > but I don't know if those are worth retaining.
>
> "DCsmarthost" only works if you chose smarthost in the first
> exim4-config setup menu, but you chose internet site (which seems the
> correct setting) so it'd be harmful here.
>
> > Comments gratefully received.
>
> adding this to the router
>
>     conditon = ${if or{{<{67}{${randint:100}}}\
>      {!first_delivery}}}

>
> Will leak 33% of the first delivery attempts though to the direct smtp
> delivery router, allowing you to warm up with yahoo, but if yahoo then
> rejcts them the retries will go through the smarthost router.
>
> That will produce some traffic from your IP address allowing warm-up
>
> If you want to get tricky you could make an expressiogn using
> $tod_epoch that tapers off the percentage over time.
>
> this will taper it off over 40 days
>
>    conditon = ${if or{{>{$tod_epoch}\
>       {${eval:1555539108+${randint:${eval:24*60*60*40}}}
>       \}}{!first_delivery}}}

>     
> I computed the constant "1555539108" by
>
> /usr/sbin/exim -be '${eval:24*3600*40+$tod_epoch}'


Dear Jasen

Thank you for the comprehensive and very interesting suggestions which
are really interesting.

The ignore_target_hosts idea is great; and the <{67} condition and the
40 day epoch techniques are super cool!

Thanks a lot for the expert suggestions.

Rory