From 5ca2a9a1a936ecc55402a1d40b7d8adb74865aba Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Wed, 6 Apr 2005 15:26:52 +0000 Subject: [PATCH] Fix logging bug when two addresses to the same host list go to different hosts with different TLS usage within the same delivery process. --- doc/doc-txt/ChangeLog | 12 +++++++++++- src/src/transports/smtp.c | 9 ++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 7ac876c15..4d7dd8517 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.116 2005/04/06 14:40:23 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.117 2005/04/06 15:26:52 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -179,6 +179,16 @@ PH/28 Modified OS/os.c-Linux with PH/29 Installed patch from the Sieve maintainer that adds the options sieve_useraddress and sieve_subaddress to the redirect router. +PH/30 In these circumstances: + . Two addresses routed to the same list of hosts; + . First host does not offer TLS; + . First host accepts first address; + . First host gives temporary error to second address; + . Second host offers TLS and a TLS session is established; + . Second host accepts second address. + Exim incorrectly logged both deliveries with the TLS parameters (cipher + and peerdn, if requested) that were in fact used only for the second + address. A note about Exim versions 4.44 and 4.50 diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index edcdc409d..91410332d 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/transports/smtp.c,v 1.8 2005/03/22 15:45:35 ph10 Exp $ */ +/* $Cambridge: exim/src/src/transports/smtp.c,v 1.9 2005/04/06 15:26:52 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1020,8 +1020,11 @@ if (tls_offered && !suppress_tls && for (addr = addrlist; addr != NULL; addr = addr->next) { - addr->cipher = tls_cipher; - addr->peerdn = tls_peerdn; + if (addr->transport_return == PENDING_DEFER) + { + addr->cipher = tls_cipher; + addr->peerdn = tls_peerdn; + } } } } -- 2.25.1