Re: [exim] smtp timeouts sending to google servers

Top Page
Delete this message
Reply to this message
Author: Gary Stainburn
Date:  
To: exim-users
Subject: Re: [exim] smtp timeouts sending to google servers
On 03/02/2021 16:01, Evgeniy Berdnikov via Exim-users wrote:
> On Wed, Feb 03, 2021 at 03:12:32PM +0000, Gary Stainburn via Exim-users wrote:
>> 3) Until I fix the underlying problems, is it possible to route all emails
>> destined to google servers through another of my Exim boxes?
> Yes, look for description of "manualroute" router in Exim's documentation.

Thanks for the comment.  This is what I was looking for.  I found the
following examples.

1) manual selection

domainlist smarthost_domains = lsearch; /etc/exim/lists/smarthost_domains

Router

smarthost:
  driver = manualroute
  domains = +smarthost_domains
  transport = remote_smtp
  route_data = smtp.isp.com
  no_more

2) selection based on MX entry

domainlist single_domain_mx = aspmx.l.google.com :
gmail-smtp-in.l.google.com : mx-eu.mail.am0.yahoodns.net

Router

smarthost_MX:
  debug_print = "R: dnslookup_single_domain for $local_part@$domain"
  driver = dnslookup
  domains = ! +local_domains : ! +relay_to_domains
  condition = ${if forany{${lookup dnsdb{>:
mxh=$domain}}}{match_domain{$item}{+single_domain_mx}}}
  transport = remote_smtp_single_domain
  same_domain_copy_routing = yes
  no_more

Transport

remote_smtp_single_domain:
  debug_print = "T: remote_smtp_single_domain for $local_part@$domain"
  driver = smtp
  multi_domain = false