[Tickets #7720] Re: _authenticate function in Horde/Auth/imap.php fails to read imap error status

bugs at horde.org bugs at horde.org
Tue Dec 2 21:28:16 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/7720
------------------------------------------------------------------------------
  Ticket             | 7720
  Updated By         | Michael Slusarz <slusarz at horde.org>
  Summary            | _authenticate function in Horde/Auth/imap.php fails to
                     | read imap error status
  Queue              | Horde Base
  Version            | 3.1.7
  Type               | Enhancement
-State              | Feedback
+State              | Rejected
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Michael Slusarz
------------------------------------------------------------------------------


Michael Slusarz <slusarz at horde.org> (2008-12-02 16:28) wrote:

> Since they are errors or even alerts, shouldn't we log them with
> PEAR_LOG_ERR then, or at least PEAR_LOG_NOTICE?

Alerts - never.  Alerts are designed (and required) to be displayed to  
the user; there is no need to log them.  The only reason the DEBUG log  
is in there now is in case an IMAP alert happens to sneak by.

For IMAP errors (from imap_errors()) - after further review, I believe  
the current way we handle errors - via debug logging only - is proper.  
  The main issue is that c-client throws all sorts of spurious errors  
that will quickly fill a long with useless information.  Here are some  
example errors:

Nov 30 20:45:40 HORDE [debug] [imp] IMAP errors: Invalid mailbox list:  
; [pid 3321 on line 184 of "/httpd/htsdocs/horde/imp/lib/IMAP.php"]

Dec 01 12:02:59 HORDE [debug] [imp] IMAP errors: Unexpected characters  
at end of address: <slusarz at curecanti.org> [pid 3318 on line 184 of  
"/httpd/htsdocs/horde/imp/lib/IMAP.php"]

These are *not* errors they should be showing up in a log configured  
for PEAR_LOG_ERR.  These are errors suitable for debugging only (these  
errors aren't even being thrown by the server - they are being thrown  
by c-client internals and deal with bad formatting, not an issue with  
the server or the client-server connection).  If an admin is truly  
having issues connecting to an IMAP server, they should either be  
diagnosing on the IMAP side or enabling debug logging while diagnosing  
the problem.  But logging these errors normally will make it difficult  
to realistically be able to parse a log for truly critical errors.

BTW, here is an example of an IMAP error from authentication failure:
Dec 01 06:05:31 HORDE [debug] [imp] IMAP errors: Retrying LOGIN  
authentication after AUTHENTICATE failed Retrying LOGIN authentication  
after AUTHENTICATE failed Can not authenticate to IMAP server:  
AUTHENTICATE failed [pid 3320 on line 184 of  
"/httpd/htsdocs/horde/imp/lib/IMAP.php"]

Not useful at all.  The information we currently provide to the end  
user is more than sufficient.





More information about the bugs mailing list