-/* $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.10 2005/04/07 10:54:54 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
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;
+ }
}
}
}
uschar *serialize_key = NULL;
/* Default next host is next host. :-) But this can vary if the
- hosts_max_try limit is hit (see below). */
+ hosts_max_try limit is hit (see below). It may also be reset if a host
+ address is looked up here (in case the host was multihomed). */
nexthost = host->next;
continue; /* With next host */
}
+ /* Reset the default next host in case a multihomed host whose addresses
+ are not looked up till just above added 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