+@@ -369,7 +369,7 @@
+ stream = vstream_fdopen(sock, O_RDWR);
+ if ((ch = VSTREAM_GETC(stream)) == VSTREAM_EOF) {
+ vstring_sprintf(why, "connect to %s[%s]: server dropped connection without sending the initial greeting",
+- addr->name, inet_ntoa(sin.sin_addr));
++ addr->name, hbuf);
+ smtp_errno = SMTP_RETRY;
+ vstream_fclose(stream);
+ return (0);
+@@ -381,7 +381,7 @@
+ */
+ if (ch == '4' && var_smtp_skip_4xx_greeting) {
+ vstring_sprintf(why, "connect to %s[%s]: server refused mail service",
+- addr->name, inet_ntoa(sin.sin_addr));
++ addr->name, hbuf);
+ smtp_errno = SMTP_RETRY;
+ vstream_fclose(stream);
+ return (0);
+@@ -392,12 +392,12 @@
+ */
+ if (ch == '5' && var_smtp_skip_5xx_greeting) {
+ vstring_sprintf(why, "connect to %s[%s]: server refused mail service",
+- addr->name, inet_ntoa(sin.sin_addr));
++ addr->name, hbuf);
+ smtp_errno = SMTP_RETRY;
+ vstream_fclose(stream);
+ return (0);
+ }
+- return (smtp_session_alloc(dest, stream, addr->name, inet_ntoa(sin.sin_addr)));
++ return (smtp_session_alloc(dest, stream, addr->name, hbuf));
+ }
+
+ /* smtp_connect_host - direct connection to host */