diff options
-rw-r--r-- | src/src/exim.h | 8 | ||||
-rw-r--r-- | src/src/transports/smtp.c | 2 |
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)); |