]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: Remove fallback to net_gethostbyname as not supported by upcoming changes.
authorsergey.kitov <sergey.kitov@open-xchange.com>
Thu, 6 Feb 2025 12:26:10 +0000 (14:26 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 19 May 2025 08:07:56 +0000 (08:07 +0000)
src/lib-smtp/smtp-client-connection.c

index e2dce2680faa009f975de9234f9895750d6fa722..48e1aea924925abc24d03c721ccdb3014aa77505 100644 (file)
@@ -1876,9 +1876,6 @@ static void
 smtp_client_connection_lookup_ip(struct smtp_client_connection *conn)
 {
        struct dns_client_settings dns_set;
-       struct ip_addr *ips;
-       unsigned int ips_count;
-       int ret;
 
        if (conn->ips_count != 0)
                return;
@@ -1902,25 +1899,8 @@ smtp_client_connection_lookup_ip(struct smtp_client_connection *conn)
                                 smtp_client_connection_dns_callback, conn,
                                 &conn->dns_lookup);
        } else {
-               /* no dns-conn, use blocking lookup */
-               ret = net_gethostbyname(conn->host, &ips, &ips_count);
-               if (ret != 0) {
-                       e_error(conn->event, "net_gethostbyname(%s) failed: %s",
-                               conn->host, net_gethosterror(ret));
-                       timeout_remove(&conn->to_connect);
-                       conn->to_connect = timeout_add_short(
-                               0,
-                               smtp_client_connection_delayed_host_lookup_failure,
-                               conn);
-                       return;
-               }
-
-               e_debug(conn->event, "DNS lookup successful; got %d IPs",
-                       ips_count);
-
-               conn->ips_count = ips_count;
-               conn->ips = i_new(struct ip_addr, ips_count);
-               memcpy(conn->ips, ips, ips_count * sizeof(*ips));
+               /* FIXME: fully removed in the following commits */
+               i_unreached();
        }
 }