summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Arlott <bugzilla.exim.simon@arlott.org>2018-03-11 16:25:28 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2018-03-11 17:20:04 +0000
commit2556b3c619956593f4ac43b30a7b4e15228888d6 (patch)
treebb4fef553af06309e768d755c82000582a968dea /src
parent8b77d27a46e94c347172941fc7a07b17f1e4da25 (diff)
PRDR: append overall DATA acceptance message to delivery log line "C=" item. Bug 2253
It can have useful tracking info from the destination, eg. their message Id.
Diffstat (limited to 'src')
-rw-r--r--src/src/transports/smtp.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index add425326..c4a6c0283 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -3224,8 +3224,11 @@ else
#ifndef DISABLE_PRDR
if (sx.prdr_active)
{
+ const uschar * overall_message;
+
/* PRDR - get the final, overall response. For any non-success
upgrade all the address statuses. */
+
sx.ok = smtp_read_response(&sx.inblock, sx.buffer, sizeof(sx.buffer), '2',
sx.ob->final_timeout);
if (!sx.ok)
@@ -3241,7 +3244,14 @@ else
goto RESPONSE_FAILED;
}
- /* Update the journal, or setup retry. */
+ /* Append the overall response to the individual PRDR response for logging
+ and update the journal, or setup retry. */
+
+ overall_message = string_printing(sx.buffer);
+ for (addr = addrlist; addr != sx.first_addr; addr = addr->next)
+ if (addr->transport_return == OK)
+ addr->message = string_sprintf("%s\\n%s", addr->message, overall_message);
+
for (addr = addrlist; addr != sx.first_addr; addr = addr->next)
if (addr->transport_return == OK)
{