]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/transports/lmtp.c
Support log_selector smtp_confirmation for the lmtp transport. Bug 1157
[user/henk/code/exim.git] / src / src / transports / lmtp.c
index 433686d068dc7ffe4c93f173c0d8f07f5d823d28..7a1e7c47196160cfbec7cc8c0747559d8463c4b1 100644 (file)
@@ -1,5 +1,3 @@
-/* $Cambridge: exim/src/src/transports/lmtp.c,v 1.11 2009/11/16 19:50:39 nm4 Exp $ */
-
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
@@ -212,7 +210,7 @@ Returns:     TRUE if successful, FALSE if not, with errno set
 */
 
 static BOOL
-lmtp_write_command(int fd, char *format, ...)
+lmtp_write_command(int fd, const char *format, ...)
 {
 int count, rc;
 va_list ap;
@@ -664,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. */