[exim-cvs] PP/12 fix uninitialised greeting string from PP/0…

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] PP/12 fix uninitialised greeting string from PP/03
Gitweb: http://git.exim.org/exim.git/commitdiff/0d0e445543703d3294a16a17a4606c9eade7afcb
Commit:     0d0e445543703d3294a16a17a4606c9eade7afcb
Parent:     0c7e18012fbe839480d6c657e1e39a2f4d41f6fe
Author:     Phil Pennock <pdp@???>
AuthorDate: Mon Oct 3 08:10:11 2011 -0400
Committer:  Phil Pennock <pdp@???>
CommitDate: Mon Oct 3 08:10:11 2011 -0400


    PP/12 fix uninitialised greeting string from PP/03
---
 doc/doc-txt/ChangeLog     |    2 ++
 src/src/transports/smtp.c |   21 ++++++++++-----------
 2 files changed, 12 insertions(+), 11 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index a911d80..b58444a 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -121,6 +121,8 @@ PP/11 match_* no longer expand right-hand-side by default.
       New compile-time build option, EXPAND_LISTMATCH_RHS.
       New expansion conditions, "inlist", "inlisti".


+PP/12 fix uninitialised greeting string from PP/03 (smtps client support).
+

 Exim version 4.76
 -----------------
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 53012ec..c571d87 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -1181,21 +1181,20 @@ if (tls_active >= 0)
       }
     }


-  /* For SMTPS we need to wait for the initial OK response.
-  Also, it seems likely that a server not supporting STARTTLS is broken
-  enough to perhaps not support EHLO. */
+  /* For SMTPS we need to wait for the initial OK response. */
   if (smtps)
     {
     if (!smtp_read_response(&inblock, buffer, sizeof(buffer), '2',
       ob->command_timeout)) goto RESPONSE_FAILED;
-    if (esmtp)
-      greeting_cmd = "EHLO";
-    else
-      {
-      greeting_cmd = "HELO";
-      DEBUG(D_transport)
-        debug_printf("not sending EHLO (host matches hosts_avoid_esmtp)\n");
-      }
+    }
+
+  if (esmtp)
+    greeting_cmd = "EHLO";
+  else
+    {
+    greeting_cmd = "HELO";
+    DEBUG(D_transport)
+      debug_printf("not sending EHLO (host matches hosts_avoid_esmtp)\n");
     }


if (smtp_write_command(&outblock, FALSE, "%s %s\r\n",