6.0.0-beta1
10/18/25

[#13694] Failure to authenticate to IMAP
Summary Failure to authenticate to IMAP
Queue IMP
Queue Version 6.2.3
Type Bug
State Not A Bug
Priority 2. Medium
Owners
Requester bonnaud (at) hotmail (dot) com
Created 11/13/2014 (3992 days ago)
Due
Updated 11/15/2014 (3990 days ago)
Assigned 11/13/2014 (3992 days ago)
Resolved 11/15/2014 (3990 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/15/2014 12:58:42 AM Michael Slusarz Comment #5
State ⇒ Not A Bug
Reply to this comment
Read INSTALL and/or the comments on top of all of the default 
configuration files.
11/15/2014 12:26:41 AM bonnaud (at) hotmail (dot) com Comment #4 Reply to this comment
After going thru to enable the debug ( thanks for pointing it out I 
didn't knew it was there ) It became very obvious where the problem is.

Pear upgrade overwrite the config files and put back the server imap 
as 'localhost' which wasn't working since the imap is NOT localhost.

Could I ask why PEAR overwrite the config files without asking which 
one to keep ( as apt-get do when upgrading package ) ?
11/13/2014 11:20:45 AM Jan Schneider Comment #3
State ⇒ Feedback
Priority ⇒ 2. Medium
Reply to this comment
To further debug this issue, we need details of the IMP -> IMAP/POP 
communication.

To enable debugging, see instructions contained in 
imp/config/backends.php (the 'debug' config parameter).

Debugging should not be enabled on a production server,   Attach/post 
only the portion of the log that directly deals with the problem 
reported (it may be simplest to clear the log file and then perform 
the event that causes the error).
11/13/2014 03:20:25 AM bonnaud (at) hotmail (dot) com Comment #2 Reply to this comment
Fortunatly I run on a VM and took a snapshot prior doing all the experiments.

There is the readout of my pear list-upgrades

pear.horde.org Available Upgrades (stable):
===========================================
Channel        Package Local          Remote         Size
pear.horde.org imp     6.2.2 (stable) 6.2.3 (stable) 4813kB
Channel pear.php.net: No upgrades available
Channel pecl.php.net: No upgrades available

If I go and pear upgrade horde/imp next step is that I can't connect 
anymore to the whole horde framework.

I get simply this on the login screen : Error connecting to mail server.

I monitor the db server and I do see query hitting the server.


------------------------------------------------------------------------------------------------------------------------------------------------------------------------


horde/imp/config.php :

<?php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Id: e93c23a84c830cda12393f7a254c20d3800efd86 $
$conf['user']['allow_view_source'] = true;
$conf['server']['server_list'] = 'none';
$conf['compose']['use_vfs'] = false;
$conf['compose']['link_attachments'] = false;
$conf['compose']['attach_size_limit'] = 0;
$conf['compose']['attach_count_limit'] = 0;
$conf['compose']['reply_limit'] = 200000;
$conf['compose']['ac_threshold'] = 3;
$conf['compose']['htmlsig_img_size'] = 30000;
$conf['pgp']['keylength'] = 0;
$conf['maillog']['driver'] = 'history';
$conf['sentmail']['driver'] = 'Null';
$conf['contactsimage']['backends'] = array('IMP_Contacts_Avatar_Addressbook');
$conf['tasklist']['use_tasklist'] = true;
$conf['notepad']['use_notepad'] = true;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */


------------------------------------------------------------------------------------------------------------------------------------------------------------------------


horde/config/conf.php :

<?php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Id: edf8597b0509ec080ee0aa0916b767af7012489b $
$conf['vhosts'] = false;
$conf['debug_level'] = E_ALL & ~E_NOTICE;
$conf['max_exec_time'] = 0;
$conf['compress_pages'] = true;
$conf['secret_key'] = '/*SNIP*/';
$conf['umask'] = 077;
$conf['testdisable'] = true;
$conf['use_ssl'] = 2;
$conf['server']['name'] = $_SERVER['SERVER_NAME'];
$conf['urls']['token_lifetime'] = 30;
$conf['urls']['hmac_lifetime'] = 30;
$conf['urls']['pretty'] = 'rewrite';
$conf['safe_ips'] = array();
$conf['session']['name'] = 'Horde';
$conf['session']['use_only_cookies'] = true;
$conf['session']['timeout'] = 0;
$conf['session']['cache_limiter'] = 'nocache';
$conf['session']['max_time'] = 72000;
$conf['cookie']['domain'] = $_SERVER['SERVER_NAME'];
$conf['cookie']['path'] = '/';
$conf['sql']['username'] = '/*SNIP*/';
$conf['sql']['password'] = '/*SNIP*/';
$conf['sql']['hostspec'] = '/*SNIP*/';
$conf['sql']['port'] = 3306;
$conf['sql']['protocol'] = 'tcp';
$conf['sql']['database'] = 'horde';
$conf['sql']['charset'] = 'utf-8';
$conf['sql']['ssl'] = false;
$conf['sql']['splitread'] = false;
$conf['sql']['phptype'] = 'mysqli';
$conf['nosql']['phptype'] = false;
$conf['ldap']['useldap'] = false;
$conf['auth']['admins'] = array('/*SNIP*/');
$conf['auth']['checkip'] = true;
$conf['auth']['checkbrowser'] = true;
$conf['auth']['resetpassword'] = true;
$conf['auth']['alternate_login'] = false;
$conf['auth']['redirect_on_logout'] = false;
$conf['auth']['list_users'] = 'input';
$conf['auth']['params']['app'] = 'imp';
$conf['auth']['driver'] = 'application';
$conf['auth']['params']['count_bad_logins'] = false;
$conf['auth']['params']['login_block'] = false;
$conf['auth']['params']['login_block_count'] = 5;
$conf['auth']['params']['login_block_time'] = 5;
$conf['signup']['allow'] = false;
$conf['log']['priority'] = 'INFO';
$conf['log']['ident'] = 'HORDE';
$conf['log']['name'] = LOG_USER;
$conf['log']['type'] = 'syslog';
$conf['log']['enabled'] = true;
$conf['log_accesskeys'] = false;
$conf['prefs']['maxsize'] = 65535;
$conf['prefs']['params']['driverconfig'] = 'horde';
$conf['prefs']['driver'] = 'Sql';
$conf['alarms']['params']['driverconfig'] = 'horde';
$conf['alarms']['params']['ttl'] = 300;
$conf['alarms']['driver'] = 'Sql';
$conf['group']['driverconfig'] = 'horde';
$conf['group']['driver'] = 'Sql';
$conf['alarms']['params']['driverconfig'] = 'horde';
$conf['alarms']['params']['ttl'] = 300;
$conf['alarms']['driver'] = 'Sql';
$conf['group']['driverconfig'] = 'horde';
$conf['group']['driver'] = 'Sql';
$conf['perms']['driverconfig'] = 'horde';
$conf['perms']['driver'] = 'Sql';
$conf['share']['no_sharing'] = false;
$conf['share']['auto_create'] = true;
$conf['share']['world'] = true;
$conf['share']['any_group'] = false;
$conf['share']['hidden'] = false;
$conf['share']['cache'] = false;
$conf['share']['driver'] = 'Sql';
$conf['cache']['default_lifetime'] = 86400;
$conf['cache']['params']['sub'] = 0;
$conf['cache']['driver'] = 'File';
$conf['cache']['use_memorycache'] = '';
$conf['cachecssparams']['url_version_param'] = true;
$conf['cachecss'] = false;
$conf['cachejsparams']['url_version_param'] = true;
$conf['cachejs'] = false;
$conf['cachethemes'] = false;
$conf['lock']['params']['driverconfig'] = 'horde';
$conf['lock']['driver'] = 'Sql';
$conf['token']['params']['driverconfig'] = 'horde';
$conf['token']['driver'] = 'Sql';
$conf['history']['params']['driverconfig'] = 'horde';
$conf['history']['driver'] = 'Sql';
$conf['davstorage']['params']['driverconfig'] = 'horde';
$conf['davstorage']['driver'] = 'Sql';
$conf['mailer']['params']['host'] = '/*SNIP*/';
$conf['mailer']['params']['port'] = 25;
$conf['mailer']['params']['username_auth'] = true;
$conf['mailer']['params']['password_auth'] = true;
$conf['mailer']['params']['auth'] = true;
$conf['mailer']['params']['lmtp'] = false;
$conf['mailer']['type'] = 'smtp';
$conf['vfs']['params']['driverconfig'] = 'horde';
$conf['vfs']['type'] = 'Sql';
$conf['sessionhandler']['params']['driverconfig'] = 'horde';
$conf['sessionhandler']['type'] = 'Sql';
$conf['sessionhandler']['hashtable'] = false;
$conf['spell']['driver'] = '';
$conf['gnupg']['keyserver'] = array('pool.sks-keyservers.net');
$conf['gnupg']['timeout'] = 10;
$conf['nobase64_img'] = false;
$conf['image']['driver'] = 'Imagick';
$conf['exif']['driver'] = 'Php';
$conf['timezone']['location'] = 'ftp://ftp.iana.org/tz/tzdata-latest.tar.gz';
$conf['problems']['email'] = 'webmaster@example.com';
$conf['problems']['maildomain'] = 'example.com';
$conf['problems']['tickets'] = false;
$conf['problems']['attachments'] = true;
$conf['menu']['links']['help'] = 'authenticated';
$conf['menu']['links']['prefs'] = 'authenticated';
$conf['menu']['links']['problem'] = 'authenticated';
$conf['menu']['links']['login'] = 'all';
$conf['menu']['links']['logout'] = 'authenticated';
$conf['portal']['fixed_blocks'] = array('ansel:ansel_Block_Gallery');
$conf['accounts']['driver'] = 'null';
$conf['user']['verify_from_addr'] = true;
$conf['user']['select_view'] = true;
$conf['facebook']['enabled'] = false;
$conf['twitter']['enabled'] = false;
$conf['urlshortener'] = false;
$conf['weather']['provider'] = false;
$conf['imap']['server'] = '/*SNIP*/';
$conf['imap']['port'] = 143;
$conf['imap']['secure'] = 'tls';
$conf['imap']['maildomain'] = '/*SNIP*/';
$conf['imap']['cache_folders'] = true;
$conf['imap']['enabled'] = true;
$conf['imsp']['enabled'] = false;
$conf['kolab']['enabled'] = false;
$conf['hashtable']['driver'] = 'none';
$conf['activesync']['enabled'] = false;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */


------------------------------------------------------------------------------------------------------------------------------------------------------------------------


And there is the only syslog that I get to work with ( I've checked 
the noted lines and they plainly just are the sprintf of the error so 
no help ) :

Nov 12 18:23:58 /*SNIP*/ : [imp] [login] Error connecting to mail 
server. [pid 6605 on line 730 of "/horde/imp/lib/Imap.php"]
Nov 12 18:23:58 /*SNIP*/ : [imp] FAILED LOGIN for /*SNIP*/ (/*SNIP*/) 
(forwarded for [/*SNIP*/]) to {imap://localhost/} [pid 6605 on line 
157 of "/horde/imp/lib/Auth.php"]
Nov 12 18:23:58 /*SNIP*/ : [horde] FAILED LOGIN for /*SNIP*/ to horde 
(/*SNIP*/) [pid 6605 on line 199 of "/horde/login.php"]


11/13/2014 02:17:28 AM bonnaud (at) hotmail (dot) com Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ Failure to authenticate to IMAP
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Following a pear upgrade pear and a pear upgrade-all it became 
impossible to log into horde.

Horde is configure to let IMP handle the login. I removed 
configuration and was able to connect to horde.

Updated all config and DBs. Set back the login thru IMP. Again 
impossible to login.

Removed configuration again. Set up the DB back. Set horde to 
authenticate directly thru IMAP. It worked but when I click on mail, 
authentication is again required and fail constantly.

I have little log to trace the issue ( none really ). But this is a 
major one !

The IMAP server is Courrier/Postfix that both authenticate to a 
mysql-db. IMAP and SMTP is on a separate server and work great. Horde 
authentication thru IMAP work great and the problem seems to be only 
related to the latest stable version of IMP wich refuse to authenticate.

Saved Queries