From 666747319bfbc2e270ddb694805eac1f5f3075a6 Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Thu, 16 Jul 2009 11:30:10 +0200 Subject: [PATCH] dma: always send EHLO after tls setup We have to send EHLO even after a STARTTLS, so unconditionally send it after connection/tls setup. --- libexec/dma/net.c | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/libexec/dma/net.c b/libexec/dma/net.c index 7657404351..943a8df987 100644 --- a/libexec/dma/net.c +++ b/libexec/dma/net.c @@ -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); } /* -- 2.41.0