From c9bdd01cc4b25b31358280605e6ca05a90835da3 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Fri, 14 Jan 2005 10:25:33 +0000 Subject: [PATCH] Don't send QUIT after a timeout in a callout connection. --- doc/doc-txt/ChangeLog | 7 ++++++- src/src/verify.c | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 04b87509b..6c6b6641c 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.70 2005/01/13 16:15:52 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.71 2005/01/14 10:25:33 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -317,6 +317,11 @@ Exim version 4.50 session; change 4.31/43 added the unwanted input to the log line - except that it did not do this in the start of session case. It now does. +72. After a timeout in a callout SMTP session, Exim still sent a QUIT command. + This is wrong and can cause the other end to generate a synchronization + error if it is another Exim or anything else that does the synchronization + check. A QUIT command is no longer sent after a timeout. + Exim version 4.43 ----------------- diff --git a/src/src/verify.c b/src/src/verify.c index f5f6b5d32..8b8e32973 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/verify.c,v 1.12 2005/01/12 15:41:27 ph10 Exp $ */ +/* $Cambridge: exim/src/src/verify.c,v 1.13 2005/01/14 10:25:33 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -377,6 +377,7 @@ for (host = host_list; host != NULL && !done; host = host->next) smtp_outblock outblock; int host_af; int port = 25; + BOOL send_quit = TRUE; uschar *helo = US"HELO"; uschar *interface = NULL; /* Outgoing interface to use; NULL => any */ uschar inbuffer[4096]; @@ -609,6 +610,7 @@ for (host = host_list; host != NULL && !done; host = host->next) if (errno == ETIMEDOUT) { HDEBUG(D_verify) debug_printf("SMTP timeout\n"); + send_quit = FALSE; } else if (errno == 0) { @@ -637,7 +639,7 @@ for (host = host_list; host != NULL && !done; host = host->next) /* End the SMTP conversation and close the connection. */ - (void)smtp_write_command(&outblock, FALSE, "QUIT\r\n"); + if (send_quit) (void)smtp_write_command(&outblock, FALSE, "QUIT\r\n"); close(inblock.sock); } /* Loop through all hosts, while !done */ -- 2.30.2