From 83364d30f60965fc809f0340cb5cab5f17b6b1c9 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Tue, 22 Mar 2005 15:45:35 +0000 Subject: Bugzilla #2: If the last fallback host listed was multihomed, only its first IP address was ever used. --- src/src/transports/smtp.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') 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 -- cgit v1.2.3