servername not honored in imapd.c?

Ken Murchison murch at andrew.cmu.edu
Wed Feb 8 19:59:04 EST 2006


Steve Huston wrote:
> In debugging a problem we've got since upgrading to Cyrus 2.3.1 (among 
> other
> things), I discovered that at one point Pine checks to see if the name
> returned by the server is equal to the name that it thinks it connected to,
> and if not it seems to open another socket to the IMAP server.  This 
> causes a
> bit of a slowdown on some machines, and was noticed here.  Regardless of 
> the
> issue above, I found the following while poking around.
> 
> If you telnet to the IMAP server, it reports its actual hostname instead of
> the name set in /etc/imapd.conf for "servername", which is itself 
> described as
> the hostname to return to clients.  The relevant area in imap/imapd.c is
> around line 949 in void cmdloop():
> 
>     gethostname(hostname, sizeof(hostname));
>     prot_printf(imapd_out,
>                 "* OK %s Cyrus IMAP4 %s%s server ready\r\n", hostname,
>                 config_mupdate_server ? "(Murder) " : "", CYRUS_VERSION);
> 
> Shouldn't the first prot_printf argument be "config_servername" instead of
> "hostname"?  I don't recall having this problem on our old server, so 

Yup, that's a bug.  I will fix it in CVS.


-- 
Kenneth Murchison
Project Cyrus Developer/Maintainer
Carnegie Mellon University


More information about the Info-cyrus mailing list