]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: lmtp-proxy - Wrap IPv6 in [...] for redirect path.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sat, 20 Nov 2021 23:35:08 +0000 (00:35 +0100)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 17 Jan 2022 11:52:10 +0000 (13:52 +0200)
src/lmtp/lmtp-proxy.c

index c87b99641cd0946f1a0bf1a33bf7faf9004decee..fac295e894c863374dc0c00ef492718d5b7c65e2 100644 (file)
@@ -461,13 +461,13 @@ lmtp_proxy_rcpt_get_redirect_path(struct lmtp_proxy_recipient *lprcpt,
 
        i_assert(conn->set.set.host_ip.family != 0);
 
-       str_printfa(str, "%s:%u",
-                   net_ip2addr(&conn->set.set.host_ip), conn->set.set.port);
+       str_printfa(str, "%s",
+                   net_ipport2str(&conn->set.set.host_ip, conn->set.set.port));
        if (!array_is_created(&lprcpt->redirect_path))
                return;
        array_foreach(&lprcpt->redirect_path, redirect) {
-               str_printfa(str, ",%s:%u",
-                           net_ip2addr(&redirect->ip), redirect->port);
+               str_printfa(str, ",%s",
+                           net_ipport2str(&redirect->ip, redirect->port));
        }
 }