summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-05-17 21:07:39 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-05-17 21:13:28 +0100
commitc3f2eb9a7d99f12fb5b20d88e9bc18a0aa016d64 (patch)
tree6b22991bcedaf57960621ca6437cacae6f1ceb3a
parentfc16abb4d06c7ae375b227bd83473412c8985c6f (diff)
Delivery: clarify error log line. Bug 1782
"retry time not reached for any host after a long failure period" has generated so many queries it plainly is not clear. Replace with "all hosts for 'dom.ain' have been failing for a long time (and retry time not reached)".
-rw-r--r--src/src/transports/smtp.c30
-rw-r--r--test/log/04614
-rw-r--r--test/mail/0461.CALLER4
3 files changed, 18 insertions, 20 deletions
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 234467437..d295e8019 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -3921,7 +3921,7 @@ If queue_smtp is set, or this transport was called to send a subsequent message
down an existing TCP/IP connection, and something caused the host not to be
found, we end up here, but can detect these cases and handle them specially. */
-for (addr = addrlist; addr != NULL; addr = addr->next)
+for (addr = addrlist; addr; addr = addr->next)
{
/* If host is not NULL, it means that we stopped processing the host list
because of hosts_max_try or hosts_max_try_hardlimit. In the former case, this
@@ -3930,8 +3930,7 @@ for (addr = addrlist; addr != NULL; addr = addr->next)
However, if we have hit hosts_max_try_hardlimit, we want to behave as if all
hosts were tried. */
- if (host != NULL)
- {
+ if (host)
if (total_hosts_tried >= ob->hosts_max_try_hardlimit)
{
DEBUG(D_transport)
@@ -3944,7 +3943,6 @@ for (addr = addrlist; addr != NULL; addr = addr->next)
debug_printf("hosts_max_try limit caused some hosts to be skipped\n");
setflag(addr, af_retry_skipped);
}
- }
if (queue_smtp) /* no deliveries attempted */
{
@@ -3953,28 +3951,28 @@ for (addr = addrlist; addr != NULL; addr = addr->next)
addr->message = US"SMTP delivery explicitly queued";
}
- else if (addr->transport_return == DEFER &&
- (addr->basic_errno == ERRNO_UNKNOWNERROR || addr->basic_errno == 0) &&
- addr->message == NULL)
+ else if ( addr->transport_return == DEFER
+ && (addr->basic_errno == ERRNO_UNKNOWNERROR || addr->basic_errno == 0)
+ && !addr->message
+ )
{
addr->basic_errno = ERRNO_HRETRY;
- if (continue_hostname != NULL)
- {
+ if (continue_hostname)
addr->message = US"no host found for existing SMTP connection";
- }
else if (expired)
{
setflag(addr, af_pass_message); /* This is not a security risk */
- addr->message = ob->delay_after_cutoff
- ? US"retry time not reached for any host after a long failure period"
- : US"all hosts have been failing for a long time and were last tried "
- "after this message arrived";
+ addr->message = string_sprintf(
+ "all hosts%s have been failing for a long time %s",
+ addr->domain ? string_sprintf(" for '%s'", addr->domain) : US"",
+ ob->delay_after_cutoff
+ ? US"(and retry time not reached)"
+ : US"and were last tried after this message arrived");
/* If we are already using fallback hosts, or there are no fallback hosts
defined, convert the result to FAIL to cause a bounce. */
- if (addr->host_list == addr->fallback_hosts ||
- addr->fallback_hosts == NULL)
+ if (addr->host_list == addr->fallback_hosts || !addr->fallback_hosts)
addr->transport_return = FAIL;
}
else
diff --git a/test/log/0461 b/test/log/0461
index 49370d558..840265f82 100644
--- a/test/log/0461
+++ b/test/log/0461
@@ -11,7 +11,7 @@
1999-03-02 09:44:33 10HmaZ-0005vi-00 => userx@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss
-1999-03-02 09:44:33 10HmbA-0005vi-00 ** userx@test.ex R=r1 T=t1: retry time not reached for any host after a long failure period
+1999-03-02 09:44:33 10HmbA-0005vi-00 ** userx@test.ex R=r1 T=t1: all hosts for 'test.ex' have been failing for a long time (and retry time not reached)
1999-03-02 09:44:33 10HmbB-0005vi-00 <= <> R=10HmbA-0005vi-00 U=EXIMUSER P=local S=sss
1999-03-02 09:44:33 10HmbB-0005vi-00 => CALLER <CALLER@test.ex> R=r0 T=t2
1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
@@ -29,7 +29,7 @@
1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
1999-03-02 09:44:33 End queue run: pid=pppp
1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss
-1999-03-02 09:44:33 10HmbE-0005vi-00 ** userx@test.ex R=r1 T=t1: retry time not reached for any host after a long failure period
+1999-03-02 09:44:33 10HmbE-0005vi-00 ** userx@test.ex R=r1 T=t1: all hosts for 'test.ex' have been failing for a long time (and retry time not reached)
1999-03-02 09:44:33 10HmbF-0005vi-00 <= <> R=10HmbE-0005vi-00 U=EXIMUSER P=local S=sss
1999-03-02 09:44:33 10HmbF-0005vi-00 => CALLER <CALLER@test.ex> R=r0 T=t2
1999-03-02 09:44:33 10HmbF-0005vi-00 Completed
diff --git a/test/mail/0461.CALLER b/test/mail/0461.CALLER
index 35a3ff77a..7321dd6db 100644
--- a/test/mail/0461.CALLER
+++ b/test/mail/0461.CALLER
@@ -21,7 +21,7 @@ A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
userx@test.ex
- retry time not reached for any host after a long failure period
+ all hosts for 'test.ex' have been failing for a long time (and retry time not reached)
--NNNNNNNNNN-eximdsn-MMMMMMMMMM
Content-type: message/delivery-status
@@ -121,7 +121,7 @@ A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
userx@test.ex
- retry time not reached for any host after a long failure period
+ all hosts for 'test.ex' have been failing for a long time (and retry time not reached)
--NNNNNNNNNN-eximdsn-MMMMMMMMMM
Content-type: message/delivery-status