summaryrefslogtreecommitdiff
path: root/src/src/transports
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-04-19 21:18:21 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2020-04-19 21:18:21 +0100
commit1f0be89381a057aaaaa4ecd4890d4597b7f6ce80 (patch)
treeb09a18d5c02adac91b8bbb12d36104a176b5f655 /src/src/transports
parenta89b6bd32a650871031f4fce9b80ab6b7eb47d8e (diff)
downloadexim4-1f0be89381a057aaaaa4ecd4890d4597b7f6ce80.tar.gz
Events: Fix msg:defer event for the hosts_max_try_hardlimit case. Bug 2554
Diffstat (limited to 'src/src/transports')
-rw-r--r--src/src/transports/smtp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 5656e7903..a3f0351e3 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -5163,7 +5163,12 @@ retry_non_continued:
#ifndef DISABLE_EVENT
/* If the last host gave a defer raise a per-message event */
- if (!nexthost && (message_defer || rc == DEFER))
+ if ( !( nexthost
+ && unexpired_hosts_tried < ob->hosts_max_try
+ && total_hosts_tried < ob->hosts_max_try_hardlimit
+ )
+ && (message_defer || rc == DEFER)
+ )
deferred_event_raise(first_addr, host, US"msg:defer");
#endif
}