summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2021-06-28 22:17:22 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2021-06-28 22:17:22 +0100
commit9fabc8c7e29cb421b19ed4a3def77209193a3529 (patch)
treed574f8c13ef5deae072383beffea9f31cefe79ae
parenta57492a480bce6d41dec5255d4a55550aa9d4f87 (diff)
LibreSSL: TLS-write-shutdown does not push data
-rw-r--r--src/src/exim.h8
-rw-r--r--src/src/transports/smtp.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/src/exim.h b/src/src/exim.h
index 8bbeecb4d..484276bb2 100644
--- a/src/src/exim.h
+++ b/src/src/exim.h
@@ -659,5 +659,13 @@ default to EDQUOT if it exists, otherwise ENOSPC. */
# define EXIM_TCP_CORK TCP_NOPUSH
#endif
+/* LibreSSL seems to not push out the SMTP response to QUIT with our usual
+handling which is trying to get the client to FIN first so that the server does
+not get the TIME_WAIT */
+
+#if !defined(DISABLE_TLS) && defined(USE_OPENSSL) && defined(LIBRESSL_VERSION_NUMBER)
+# define SERVERSIDE_CLOSE_NOWAIT
+#endif
+
#endif
/* End of exim.h */
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index dfb4a9284..3210e596c 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -4102,7 +4102,7 @@ else
sx->send_quit = FALSE; /* avoid sending it later */
#ifndef DISABLE_TLS
- if (sx->cctx.tls_ctx) /* need to send TLS Cloe Notify */
+ if (sx->cctx.tls_ctx) /* need to send TLS Close Notify */
{
# ifdef EXIM_TCP_CORK /* Use _CORK to get Close Notify in FIN segment */
(void) setsockopt(sx->cctx.sock, IPPROTO_TCP, EXIM_TCP_CORK, US &on, sizeof(on));