-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.202 2005/08/08 10:48:26 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.203 2005/08/08 15:02:48 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
PH/19 Added sqlite_lock_timeout option (David Woodhouse's patch).
+PH/20 If a delivery was routed to a non-standard port by means of an SRV
+ record, the port was not correctly logged when the outgoing_port log
+ selector was set (it logged the transort's default port).
+
Exim version 4.52
-----------------
-/* $Cambridge: exim/src/src/smtp_out.c,v 1.5 2005/06/27 14:29:43 ph10 Exp $ */
+/* $Cambridge: exim/src/src/smtp_out.c,v 1.6 2005/08/08 15:02:48 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
host->address will always be an IPv4 address.
The port field in the host item is used if it is set (usually router from SRV
-records). In other cases, the default passed as an argument is used.
+records or elsewhere). In other cases, the default passed as an argument is
+used, and the host item is updated with its value.
Arguments:
host host item containing name and address (and sometimes port)
host_af AF_INET or AF_INET6
- port default, remote port to connect to, in host byte order for those
+ port default remote port to connect to, in host byte order, for those
hosts whose port setting is PORT_NONE
interface outgoing interface address or NULL
timeout timeout value or 0
host->port);
port = host->port;
}
+else host->port = port; /* Set the port actually used */
HDEBUG(D_transport|D_acl|D_v)
{
-/* $Cambridge: exim/src/src/transports/smtp.c,v 1.15 2005/08/02 11:22:24 ph10 Exp $ */
+/* $Cambridge: exim/src/src/transports/smtp.c,v 1.16 2005/08/08 15:02:48 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
failed by one of them.
host host to deliver to
host_af AF_INET or AF_INET6
- port TCP/IP port to use, in host byte order
+ port default TCP/IP port to use, in host byte order
interface interface to bind to, or NULL
tblock transport instance block
copy_host TRUE if host set in addr->host_used must be copied, because
}
/* SMTP, or success return from LMTP for this address. Pass back the
- actual port used. */
+ actual host that was used. */
addr->transport_return = OK;
addr->more_errno = delivery_time;
- thost->port = port;
addr->host_used = thost;
addr->special_action = flag;
addr->message = conf;
}
-/* Sort out the port. Set up a string for adding to the retry key if the port
-number is not the standard SMTP port. */
+/* Sort out the default port. */
if (!smtp_get_port(ob->port, addrlist, &port, tid)) return FALSE;
-pistring = string_sprintf(":%d", port);
-if (Ustrcmp(pistring, ":25") == 0) pistring = US"";
/* For each host-plus-IP-address on the list:
uschar *retry_message_key = NULL;
uschar *serialize_key = NULL;
+ /* Set up a string for adding to the retry key if the port number is not
+ the standard SMTP port. A host may have its own port setting that overrides
+ the default. */
+
+ pistring = string_sprintf(":%d", (host->port == PORT_NONE)?
+ port : host->port);
+ if (Ustrcmp(pistring, ":25") == 0) pistring = US"";
+
/* Default next host is next host. :-) But this can vary if the
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). */