Zend mail protocol Exception

Issue #1084 closed
Bob created an issue

I’ve been using piler version 1.1.1 for several years very successfully on Debian Jessie. I recently did apt-get update to check for any new patches. Now I can’t seem to login to piler. Getting this error from PHP:

Fatal error: Uncaught exception 'Zend_Mail_Protocol_Exception' with message 'cannot connect to host; error = (errno = 0 )' in /var/www/piler/Zend/Mail/Protocol/Imap.php:100 Stack trace: #0 /var/www/piler/Zend/Mail/Protocol/Imap.php(61): Zend_Mail_Protocol_Imap->connect('mail.edm-inc.co...', 993, true) #1 /var/www/piler/model/user/auth.php(348): Zend_Mail_Protocol_Imap->__construct('mail.edm-inc.co...', 993, true) #2 /var/www/piler/model/user/auth.php(49): ModelUserAuth->checkLoginAgainstIMAP('auditor@local', 'pilerrocks', Array) #3 /var/www/piler/controller/login/login.php(44): ModelUserAuth->checkLogin('auditor@local', 'pilerrocks') #4 [internal function]: ControllerLoginLogin->index() #5 /var/www/piler/system/front.php(36): call_user_func_array(Array, Array) #6 /var/www/piler/system/front.php(14): Front->execute(Object(Router)) #7 /var/www/piler/index.php(113): Front->dispatch(Object(Router), Object(Router)) #8 {main} thrown in /var/www/piler/Zend/Mail/Protocol/Imap.php on line 100

My dovecot imap server shows this error:

2020-07-09 15:18:20.497800500 Jul 09 15:18:20 imap-login: Info: Disconnected (no auth attempts in 0 secs): user=<>, rip=10.10.1.16, lip=10.10.1.
4, TLS handshaking: SSL_accept() failed: error:14094415:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate expired: SSL alert number 45, sessi
on=<w5L07AeqsocKCgEQ>

However, the certificate on the imap server is valid and not expired.

Any ideas what’s causing this?

Comments (5)

  1. Janos SUTO repo owner

    Well, I was lazy at that time not to catch a possible exception. Anyway, it’s fixed by now.

    To get rid of the uncaught exception simply overwrite /var/www/piler/model/user/auth.php with the attached file. The modification merely encapsulates the error throwing block in a try-catch structure. However it won’t fix the login issue. Zend says it “cannot connect to host”. So you should login to the archive via ssh, and try telnet your-imap-server 993, or you may use the openssl s_client -connect your-imapserver:993

  2. Bob reporter

    The new auth.php file fixed it. I don’t know why it was throwing the ssl error. I tried using openssl on the terminal and it worked fine.

  3. Log in to comment