summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-12-28 18:31:24 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2020-12-28 18:31:24 +0000
commit9604a84387b55efdc633dd7fb20db14a65c1e343 (patch)
treeb139b775a9b4ee1f5cbf8263f9421d393319a509
parent3b960f51c877fe70f66515e3df1e7c4e6883720f (diff)
downloadexim4-9604a84387b55efdc633dd7fb20db14a65c1e343.tar.gz
Logging: make placement of continued-delivery asterisk consistent
-rw-r--r--doc/doc-docbook/spec.xfpt7
-rw-r--r--doc/doc-txt/ChangeLog6
-rw-r--r--src/src/deliver.c5
-rw-r--r--test/log/01792
-rw-r--r--test/log/02032
-rw-r--r--test/log/02092
6 files changed, 17 insertions, 7 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 2938de576..55ccb1632 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -38312,8 +38312,11 @@ parentheses afterwards.
When more than one address is included in a single delivery (for example, two
SMTP RCPT commands in one transaction) the second and subsequent addresses are
flagged with &`->`& instead of &`=>`&. When two or more messages are delivered
-down a single SMTP connection, an asterisk follows the IP address in the log
-lines for the second and subsequent messages.
+down a single SMTP connection, an asterisk follows the
+.new
+remote IP address (and port if enabled)
+.ewn
+in the log lines for the second and subsequent messages.
When two or more messages are delivered down a single TLS connection, the
DNS and some TLS-related information logged for the first message delivered
will not be present in the log lines for the second and subsequent messages.
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index c0f83125d..e6930dd22 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -162,6 +162,12 @@ JH/32 Bug 2599: fix delay of delivery to a local address where there is also
JH/33 Fix a taint trap in the ${listextract } expansion when the source data
was tainted.
+JH/34 Fix the placement of a multiple-message delivery marker in the delivery
+ log line. The asterisk is now consistently appended to the remote IP
+ (and port, if given), and will also be provided on defer and fail log
+ lines. Previously it could be placed on the local IP if that was being
+ logged, and was only provided on delivery lines.
+
Exim version 4.94
-----------------
diff --git a/src/src/deliver.c b/src/src/deliver.c
index cba8651e9..238e33acc 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -792,6 +792,9 @@ g = string_append(g, 3, US" [", h->address, US"]");
if (LOGGING(outgoing_port))
g = string_fmt_append(g, ":%d", h->port);
+if (continue_sequence > 1) /*XXX this is wrong for a dropped proxyconn. Would have to pass back from transport */
+ g = string_catn(g, US"*", 1);
+
#ifdef SUPPORT_SOCKS
if (LOGGING(proxy) && proxy_local_address)
{
@@ -1195,8 +1198,6 @@ else
if (addr->host_used)
{
g = d_hostlog(g, addr);
- if (continue_sequence > 1) /*XXX this is wrong for a dropped proxyconn. Would have to pass back from transport */
- g = string_catn(g, US"*", 1);
#ifndef DISABLE_EVENT
deliver_host_address = addr->host_used->address;
diff --git a/test/log/0179 b/test/log/0179
index 614fea640..b32ee2997 100644
--- a/test/log/0179
+++ b/test/log/0179
@@ -3,7 +3,7 @@
1999-03-02 09:44:33 Start queue run: pid=pppp -qqf
1999-03-02 09:44:33 10HmaX-0005vi-00 => userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1]:PORT_S I=[127.0.0.1]:ppppp C="250 OK"
1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
-1999-03-02 09:44:33 10HmaY-0005vi-00 => abcd@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1]:PORT_S I=[127.0.0.1]:ppppp* C="250 OK"
+1999-03-02 09:44:33 10HmaY-0005vi-00 => abcd@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1]:PORT_S* I=[127.0.0.1]:ppppp C="250 OK"
1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
1999-03-02 09:44:33 End queue run: pid=pppp -qqf
1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for userz@domain.com
diff --git a/test/log/0203 b/test/log/0203
index 2df80335c..f94b0177d 100644
--- a/test/log/0203
+++ b/test/log/0203
@@ -3,7 +3,7 @@
1999-03-02 09:44:33 Start queue run: pid=pppp -qqf
1999-03-02 09:44:33 10HmaX-0005vi-00 => userx@domain1 R=others T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
-1999-03-02 09:44:33 10HmaY-0005vi-00 ** userx@domain1 R=others T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:<CALLER@test.ex>: 550 Don't like that sender
+1999-03-02 09:44:33 10HmaY-0005vi-00 ** userx@domain1 R=others T=smtp H=127.0.0.1 [127.0.0.1]*: SMTP error from remote mail server after MAIL FROM:<CALLER@test.ex>: 550 Don't like that sender
1999-03-02 09:44:33 10HmaZ-0005vi-00 <= <> R=10HmaY-0005vi-00 U=EXIMUSER P=local S=sss
1999-03-02 09:44:33 10HmaZ-0005vi-00 ** CALLER@test.ex: Unrouteable address
1999-03-02 09:44:33 10HmaZ-0005vi-00 Frozen (delivery error message)
diff --git a/test/log/0209 b/test/log/0209
index 8e549c30b..ad5f24c4e 100644
--- a/test/log/0209
+++ b/test/log/0209
@@ -20,7 +20,7 @@
1999-03-02 09:44:33 10HmaZ-0005vi-00 == userx@domain1 R=others T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<userx@domain1>: 450 Temporary error
1999-03-02 09:44:33 10HmaZ-0005vi-00 => usery@domain1 R=others T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmbA-0005vi-00 == userx@domain1 routing defer (-52): retry time not reached
-1999-03-02 09:44:33 10HmbA-0005vi-00 == usery@domain1 R=others T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<usery@domain1>: 450 Temporary error
+1999-03-02 09:44:33 10HmbA-0005vi-00 == usery@domain1 R=others T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]*: SMTP error from remote mail server after RCPT TO:<usery@domain1>: 450 Temporary error
1999-03-02 09:44:33 10HmbA-0005vi-00 == userx@domain1 routing defer (-52): retry time not reached
1999-03-02 09:44:33 10HmbA-0005vi-00 == usery@domain1 routing defer (-52): retry time not reached
1999-03-02 09:44:33 End queue run: pid=pppp