diff -rup orig/imap-2004.RC7/src/osdep/unix/tcp_unix.c imap-2004.RC7/src/osdep/unix/tcp_unix.c
--- orig/imap-2004.RC7/src/osdep/unix/tcp_unix.c	Sat Feb 21 09:42:01 2004
+++ imap-2004.RC7/src/osdep/unix/tcp_unix.c	Mon Mar  1 22:00:57 2004
@@ -337,7 +337,10 @@ TCPSTREAM *tcp_aopen (NETMBX *mb,char *s
       return NIL;
     }
   }
-  else if ((s = tcp_canonical (host)) != host) strcpy (host,s);
+  else {
+    strcpy (host,mb->host);
+    if ((s = tcp_canonical (host)) != host) strcpy (host,s);
+  }
 
   if (*service == '*')		/* build ssh command */
     sprintf (tmp,sshcommand,sshpath,host,
