From 83364d30f60965fc809f0340cb5cab5f17b6b1c9 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Tue, 22 Mar 2005 15:45:35 +0000 Subject: [PATCH 1/1] Bugzilla #2: If the last fallback host listed was multihomed, only its first IP address was ever used. --- doc/doc-txt/ChangeLog | 5 ++++- src/src/transports/smtp.c | 14 ++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 35f33c1bf..007252a27 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.96 2005/03/22 15:07:42 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.97 2005/03/22 15:45:35 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -68,6 +68,9 @@ PH/10 Added a nasty fudge to try to recognize and flatten LDAP passwords in PH/11 Installed exipick version 20050225.0 from John Jetmore. +PH/12 If the last host in a fallback_hosts list was multihomed, only the first + of its addresses was ever tried. (Bugzilla bug #2.) + 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 be8b15029..edcdc409d 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.7 2005/03/08 15:32:02 tom Exp $ */ +/* $Cambridge: exim/src/src/transports/smtp.c,v 1.8 2005/03/22 15:45:35 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -2172,11 +2172,6 @@ for (cutoff_retry = 0; expired && uschar *retry_message_key = NULL; uschar *serialize_key = NULL; - /* Default next host is next host. :-) But this can vary if the - hosts_max_try limit is hit (see below). */ - - nexthost = host->next; - /* Set the flag requesting that this host be added to the waiting database if the delivery fails temporarily or if we are running with queue_smtp or a 2-stage queue run. This gets unset for certain @@ -2283,6 +2278,13 @@ for (cutoff_retry = 0; expired && continue; /* With next host */ } + /* The default next host is the next host. :-) But this can vary if the + hosts_max_try limit is hit (see below). NOTE: we cannot put this setting + earlier than this, because a multihomed host whose addresses are not looked + up till just above will add to the host list. */ + + nexthost = host->next; + /* If queue_smtp is set (-odqs or the first part of a 2-stage run), or the domain is in queue_smtp_domains, we don't actually want to attempt any deliveries. When doing a queue run, queue_smtp_domains is always unset. If -- 2.30.2