]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-client-connection - Retain the host name in the connection label after...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 1 Mar 2019 15:54:48 +0000 (16:54 +0100)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 1 Mar 2019 23:56:58 +0000 (00:56 +0100)
src/lib-smtp/smtp-client-connection.c

index e13333eda095b6e1db158cf144b9b72fdfa62007..8887592caede78a647a506a16aebf167a48f2eb1 100644 (file)
@@ -1488,6 +1488,9 @@ static void
 smtp_client_connection_connect_next_ip(struct smtp_client_connection *conn)
 {
        const struct ip_addr *ip, *my_ip = &conn->set.my_ip;
+       const char *conn_name = (conn->host_is_ip ? NULL :
+                                t_strdup_printf("%s:%u", conn->host,
+                                                conn->port));
 
        timeout_remove(&conn->to_connect);
 
@@ -1503,7 +1506,7 @@ smtp_client_connection_connect_next_ip(struct smtp_client_connection *conn)
        }
 
        connection_init_client_ip_from(conn->client->conn_list, &conn->conn,
-                                      NULL, ip, conn->port, my_ip);
+                                      conn_name, ip, conn->port, my_ip);
 
        smtp_client_connection_do_connect(conn);
 }