set hosts_max_try_hardlimit to avoid excessive retries with gmail
authorClinton Ebadi <clinton@unknownlamer.org>
Mon, 5 Nov 2018 05:16:46 +0000 (00:16 -0500)
committerClinton Ebadi <clinton@unknownlamer.org>
Mon, 5 Nov 2018 05:16:46 +0000 (00:16 -0500)
Per the exim manual:

  "...when the hosts_max_try limit is reached, Exim looks down the
  host list to see if there is a subsequent host with a
  different (higher valued) MX. If there is, that host is considered
  next..."

Gmail seems to return sets of records with different priorities
now (or maybe always did), and exim is now checking all of them
instead of bailing out early.

Set the hardlimit to 3; this lets us make one attempt at delivering to
a lower priority mx without hammering gmail excessively.

conf.d/transport/30_exim4-config_remote_smtp

index a323aaa..7534101 100644 (file)
@@ -11,6 +11,7 @@ remote_smtp:
   driver = smtp
   # hcoop-change: drop hosts_max_try to avoid hitting all gmail MX at once
   hosts_max_try = 2
+  hosts_max_try_hardlimit = 3
 .ifndef IGNORE_SMTP_LINE_LENGTH_LIMIT
   message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}}
 .endif