servername not honored in imapd.c?
Steve Huston
huston at astro.princeton.edu
Wed Feb 8 16:50:17 EST 2006
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 I'm not
sure if it changed - it could be that the overall issue we're having is
because of something else, but when I found this which seems to be wrong
according to the documentation I thought I'd bring it up.
In comparison, imap/pop3d.c line 523 starts as:
prot_printf(popd_out, "+OK %s Cyrus POP3%s %s server ready %s\r\n",
config_servername, config_mupdate_server ? " Murder" : "",
CYRUS_VERSION, popd_apop_chal);
--
Steve Huston - W2SRH - Unix Sysadmin, Dept. of Astrophysical Sciences
Princeton University | ICBM Address: 40.346525 -74.651285
126 Peyton Hall |"On my ship, the Rocinante, wheeling through
Princeton, NJ 08544 | the galaxies; headed for the heart of Cygnus,
(609) 258-7375 | headlong into mystery." -Rush, 'Cygnus X-1'
More information about the Info-cyrus
mailing list