PP/12 fix uninitialised greeting string from PP/03
[exim.git] / src / src / transports / smtp.c
index 53012eced0c4715858ef4223307ff060d6b16f48..c571d874c4a1d4fa83d038c77984c7136981fd9d 100644 (file)
@@ -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",