Support log_selector smtp_confirmation for the lmtp transport. Bug 1157
[exim.git] / src / src / transports / lmtp.c
index 06eb72969ef9c4c55f620c8a3c8666f5d4f14dbe..7a1e7c47196160cfbec7cc8c0747559d8463c4b1 100644 (file)
@@ -662,8 +662,14 @@ if (send_data)
     if (addr->transport_return != PENDING_OK) continue;
 
     if (lmtp_read_response(out, buffer, sizeof(buffer), '2', timeout))
+      {
       addr->transport_return = OK;
-
+      if ((log_extra_selector & LX_smtp_confirmation) != 0)
+        {
+        uschar *s = string_printing(buffer);
+        addr->message = (s == buffer)? (uschar *)string_copy(s) : s;
+        }
+      }
     /* If the response has failed badly, use it for all the remaining pending
     addresses and give up. */