dma: always send EHLO after tls setup
authorSimon Schubert <corecode@dragonflybsd.org>
Thu, 16 Jul 2009 09:30:10 +0000 (11:30 +0200)
committerSimon Schubert <corecode@dragonflybsd.org>
Thu, 16 Jul 2009 14:13:06 +0000 (16:13 +0200)
We have to send EHLO even after a STARTTLS, so unconditionally send it
after connection/tls setup.

libexec/dma/net.c

index 7657404..943a8df 100644 (file)
@@ -364,32 +364,15 @@ deliver_remote(struct qitem *it, const char **errmsg)
                else
                        goto out;
        }
-
-       /*
-        * If the user doesn't want STARTTLS, but SSL encryption, we
-        * have to enable SSL first, then send EHLO
-        */
-       if (((config->features & STARTTLS) == 0) &&
-           ((config->features & SECURETRANS) != 0)) {
-               send_remote_command(fd, "EHLO %s", hostname());
-               if (read_remote(fd, 0, NULL) != 2) {
-                       syslog(LOG_ERR, "%s: remote delivery deferred: "
-                              " EHLO failed: %s", it->queueid, neterr);
-                       asprintf(errmsgc, "%s did not like our EHLO:\n%s",
-                           host, neterr);
-                       return (-1);
-               }
-       }
 #endif /* HAVE_CRYPTO */
-       if (((config->features & SECURETRANS) == 0)) {
-               send_remote_command(fd, "EHLO %s", hostname());
-               if (read_remote(fd, 0, NULL) != 2) {
-                       syslog(LOG_ERR, "%s: remote delivery deferred: "
-                              " EHLO failed: %s", it->queueid, neterr);
-                       asprintf(errmsgc, "%s did not like our EHLO:\n%s",
-                           host, neterr);
-                       return (-1);
-               }
+
+       send_remote_command(fd, "EHLO %s", hostname());
+       if (read_remote(fd, 0, NULL) != 2) {
+               syslog(LOG_ERR, "%s: remote delivery deferred: "
+                      " EHLO failed: %s", it->queueid, neterr);
+               asprintf(errmsgc, "%s did not like our EHLO:\n%s",
+                   host, neterr);
+               return (-1);
        }
 
        /*