[exim-dev] [Bug 2554] New event (msg:defer) does not rise wh…

Inizio della pagina
Delete this message
Reply to this message
Autore: admin
Data:  
To: exim-dev
Oggetto: [exim-dev] [Bug 2554] New event (msg:defer) does not rise when the hosts_max_try_hardlimit variable is set.
https://bugs.exim.org/show_bug.cgi?id=2554

Git Commit <git@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |git@???


--- Comment #1 from Git Commit <git@???> ---
Git commit:
https://git.exim.org/exim.git/commitdiff/1f0be89381a057aaaaa4ecd4890d4597b7f6ce80

commit 1f0be89381a057aaaaa4ecd4890d4597b7f6ce80
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Apr 19 21:18:21 2020 +0100
Commit:     Jeremy Harris <jgh146exb@???>
CommitDate: Sun Apr 19 21:18:21 2020 +0100


    Events: Fix msg:defer event for the hosts_max_try_hardlimit case.  Bug 2554
---
 doc/doc-txt/ChangeLog     | 3 +++
 src/src/transports/smtp.c | 7 ++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 9de2e11..edab6a8 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -164,6 +164,9 @@ JH/35 The dsearch lookup now requires that the directory is
an absolute path.
       Previously this was not checked, and nonempty relative paths made an
       access under Exim's current working directory.


+JH/36 Bug 2554: Fix msg:defer event for the hosts_max_try_hardlimit case.
+      Previously no event was raised.
+


 Exim version 4.93
 -----------------
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 5656e79..a3f0351 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
       }


--
You are receiving this mail because:
You are on the CC list for the bug.