I think someone mentioned this before but I'm not sure.
When login fails, we get the pretty red box, but it also shows the php error:
*Warning*: fopen(logs/errors): failed to open stream: Permission denied in * /home/public_html/webmail/program/include/bugs.inc* on line *70* *IMAP Error in ():* Authentication failed (LOGIN): "a001 NO LOGIN failed"