Implement freeze_signal on pipe transport.
[exim.git] / src / src / transports / smtp.c
index 41796a4d9d5d9d869a23748ea81afc189ac416cd..e06631f2fa50b4656cc046e5ce2a21dc01d6dd7c 100644 (file)
@@ -1078,12 +1078,10 @@ if (tls_offered && !suppress_tls &&
   if (!smtp_read_response(&inblock, buffer2, sizeof(buffer2), '2',
       ob->command_timeout))
     {
+    Ustrncpy(buffer, buffer2, sizeof(buffer));
     if (errno != 0 || buffer2[0] == 0 ||
          (buffer2[0] == '4' && !ob->tls_tempfail_tryclear))
-      {
-      Ustrncpy(buffer, buffer2, sizeof(buffer));
       goto RESPONSE_FAILED;
-      }
     }
 
   /* STARTTLS accepted: try to negotiate a TLS session. */
@@ -1717,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