I spent a long frustrating day yesterday getting our Moodle installation to work properly, after our system administrator upgraded the server OS from Red Hat 9 to Red Hat Enterprise. One problem was that newly uploaded profile images displayed as black squares. See http://moodle.org/mod/forum/discuss.php?d=10415#53592 for further details.
Another problem was that pop server authentication would not work. After a lot of experimentation, I found that I needed to make the following changes in auth/pop3/lib.php:
switch ($CFG->auth_pop3type) {
case "pop3":
$host = '{'.$host.":$CFG->auth_pop3port/pop3}INBOX";
break;
case "pop3notls":
$host = '{'.$host.":$CFG->auth_pop3port/pop3/notls}INBOX";
break;
case "pop3cert":
$host = '{'.$host.":$CFG->auth_pop3port/pop3/ssl/novalidate-cert}INBOX";
break;
}
error_reporting(0);
$connection = imap_open($host, $username, $password, OP_HALFOPEN);
to
switch ($CFG->auth_pop3type) {
case "pop3":
$host = '{'.$host.":$CFG->auth_pop3port/pop3/user=$username}INBOX";
break;
case "pop3notls":
$host = '{'.$host.":$CFG->auth_pop3port/pop3/notls/user=$username}INBOX";
break;
case "pop3cert":
$host = '{'.$host.":$CFG->auth_pop3port/pop3/ssl/novalidate-cert/user=$username}INBOX";
break;
}
error_reporting(0);
$connection = imap_open($host, $username, $password);
Note in particular that the OP_HALFOPEN option needed to be removed. [The documentation on php.net indicates that this option should only be used with imap and nntp, not pop3.]
These changes might be related to the fact that the old server was using the Cyrus imap client, whereas the new server uses the c-client imap client. After making these changes, pop3 authentication is much snappier than under the old server. It could be that the old imap client was failing and retrying with variations, whereas the new c-client makes only one try with the specified syntax for the pop3 connection.