src/transports/smtp.c: log LMTP confirmation same as SMTP
[users/jgh/exim.git] / src / src / transports / smtp.c
index d57b67429c3bfbb04a7f6206b987b07b7a6ee4a8..e06631f2fa50b4656cc046e5ce2a21dc01d6dd7c 100644 (file)
@@ -1,10 +1,10 @@
-/* $Cambridge: exim/src/src/transports/smtp.c,v 1.43 2009/10/20 13:10:15 nm4 Exp $ */
+/* $Cambridge: exim/src/src/transports/smtp.c,v 1.44 2009/11/16 19:56:54 nm4 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2007 */
+/* Copyright (c) University of Cambridge 1995 - 2009 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 #include "../exim.h"
@@ -1715,7 +1715,11 @@ if (!ok) ok = TRUE; else
           continue;
           }
         completed_address = TRUE;   /* NOW we can set this flag */
-        conf = string_sprintf("LMTP Successful delivery:%s", string_printing(buffer));
+        if ((log_extra_selector & LX_smtp_confirmation) != 0)
+          {
+          uschar *s = string_printing(buffer);
+          conf = (s == buffer)? (uschar *)string_copy(s) : s;
+          }
         }
 
       /* SMTP, or success return from LMTP for this address. Pass back the