Debug: show error for SMTP read response
authorJeremy Harris <jgh146exb@wizmail.org>
Thu, 6 Apr 2017 20:17:29 +0000 (21:17 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Thu, 6 Apr 2017 20:17:29 +0000 (21:17 +0100)
src/src/smtp_out.c
src/src/tls-openssl.c

index ba6153e..32382c3 100644 (file)
@@ -500,8 +500,9 @@ for (;;)
 
   if((rc = ip_recv(sock, inblock->buffer, inblock->buffersize, timeout)) <= 0)
     {
-    if (!errno)
-      DEBUG(D_deliver|D_transport|D_acl) debug_printf_indent("  SMTP(closed)<<\n");
+    DEBUG(D_deliver|D_transport|D_acl)
+      debug_printf_indent(errno ? "  SMTP(%s)<<\n" : "  SMTP(closed)<<\n",
+       strerror(errno));
     break;
     }
 
index 2d36882..8018d22 100644 (file)
@@ -641,7 +641,7 @@ if (!(dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL)))
 if ((8*DH_size(dh)) > tls_dh_max_bits)
   {
   DEBUG(D_tls)
-    debug_printf("dhparams file %d bits, is > tls_dh_max_bits limit of %d",
+    debug_printf("dhparams file %d bits, is > tls_dh_max_bits limit of %d\n",
         8*DH_size(dh), tls_dh_max_bits);
   }
 else