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>
Fri, 17 Jul 2009 10:45:16 +0000 (12:45 +0200)
We have to send EHLO even after a STARTTLS, so unconditionally send it
after connection/tls setup.

libexec/dma/net.c

index 07a1012..c9ea7f9 100644 (file)
@@ -331,28 +331,13 @@ 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: %m", it->queueid);
-                       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: %m", it->queueid);
-                       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: %m", it->queueid);
+               return (-1);
        }
 
        /*