[exim-cvs] DKIM: Avoid spurious tls read timeout after signi…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Exim Git Commits Mailing List
Datum:  
To: exim-cvs
Betreff: [exim-cvs] DKIM: Avoid spurious tls read timeout after signing failure
Gitweb: https://git.exim.org/exim.git/commitdiff/8de97e5b7dddd2f033d8c9d531b11eece8af3cc6
Commit:     8de97e5b7dddd2f033d8c9d531b11eece8af3cc6
Parent:     4c51d3e7c219861025834ea6a1a8457301838f95
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Mon Aug 16 21:01:04 2021 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Mon Aug 16 21:01:04 2021 +0100


    DKIM: Avoid spurious tls read timeout after signing failure
---
 src/src/transports/smtp.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)


diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index a121e34..7e6e34a 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -4436,6 +4436,21 @@ if (!sx->ok)
     message_error = Ustrncmp(smtp_command,"end ",4) == 0;
     break;


+#ifndef DISABLE_DKIM
+      case EACCES:
+    /* DKIM signing failure: avoid thinking we pipelined quit,
+    just abandon the message and close the socket. */
+
+    message_error = FALSE;
+# ifndef DISABLE_TLS
+    if (sx->cctx.tls_ctx)
+      {
+      tls_close(sx->cctx.tls_ctx, TLS_SHUTDOWN_WAIT);
+      sx->cctx.tls_ctx = NULL;
+      }
+# endif
+    break;
+#endif
       default:
     message_error = FALSE;
     break;