Limit number of MXes tried in one delivery attempt
authorClinton Ebadi <clinton@unknownlamer.org>
Tue, 19 May 2015 06:15:11 +0000 (02:15 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Tue, 19 May 2015 06:15:11 +0000 (02:15 -0400)
At least Google lists a lot of MXes, and it is probably a bad idea to
rapid fire hit all them and get rejected for attempting to forward a
spam mail on behalf of a member. Try two at once instead (for
non-gmail hosts, we retry very quickly anyway).

conf.d/transport/30_exim4-config_remote_smtp

index 7dd69b8..ac3e0d9 100644 (file)
@@ -2,9 +2,12 @@
 ### transport/30_exim4-config_remote_smtp
 #################################
 # This transport is used for delivering messages over SMTP connections.
+
+# hcoop-change: drop hosts_max_try to avoid hitting all gmail MX at once
 remote_smtp:
   debug_print = "T: remote_smtp for $local_part@$domain"
   driver = smtp
+  hosts_max_try = 2
 .ifdef REMOTE_SMTP_HOSTS_AVOID_TLS
   hosts_avoid_tls = REMOTE_SMTP_HOSTS_AVOID_TLS
 .endif