When connecting to the IMAP server, an invalid mailbox
string is created, and passed to imap_open.
This bug generates the following warning, and login fails:
Warning: imap_open() [function.imap-open]: Couldn't
open stream \{localhost:143/imap/notls/norsh}INBOX in
/var/www/secure/webmail/www/list.php on line 54
A potential fix for the problem is to rewrite the
mailbox string to this:
$Mailbox =
'{'.$IMAPHostname.":".$IMAPPort.$IMAPFlags.'}INBOX';
The bug was found on Gentoo Linux, Apache 2.0.58,
PHP-5.1.4, and Courier IMAP 3.0.7.