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 ba6153ea9b9316a1d54a74b889ae3aace7aefb64..32382c305c63a4365d0b234afd9d359eb6b2832f 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 2d36882634901e99a99a13eb2e9fc07455544c59..8018d220bb8d116f18fd53238e3552d38404afeb 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