summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
}