Gitweb:
https://git.exim.org/exim.git/commitdiff/9fabc8c7e29cb421b19ed4a3def77209193a3529
Commit: 9fabc8c7e29cb421b19ed4a3def77209193a3529
Parent: a57492a480bce6d41dec5255d4a55550aa9d4f87
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Mon Jun 28 22:17:22 2021 +0100
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Mon Jun 28 22:17:22 2021 +0100
LibreSSL: TLS-write-shutdown does not push data
---
src/src/exim.h | 8 ++++++++
src/src/transports/smtp.c | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/src/exim.h b/src/src/exim.h
index 8bbeecb..484276b 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 dfb4a92..3210e59 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));