[imp] login failed message, but login was successful

Andrew Morgan morgan at orst.edu
Thu Feb 28 17:33:53 UTC 2008


On Thu, 28 Feb 2008, neys wrote:

> Norberto Bensa wrote:
>> neys wrote:
>>> yes, but i have no uppercase names. i should mention, that my imap server
>>> (cyrus) authenticates against the same ldap database as horde. before i
>>> switched horde auth to ldap, i queried the ldap over imp auth. that worked
>>> always, i never got an "login failed" error. but since i first make an
>>> horde ldap auth and then an login to cyrus, the cyrus login failes
>>> sometimes.
>>
>> I have the very same problem at work.
>>
>> I've migrated from files/exim/courier/squirrelmail to ldap/postfix/cyrus/horde
>> and now, every now and then, horde auth success and cyrus/imp fails.
>> Actually, sort of fails because I can see the folders, but shows a "Login
>> failed" where the folder content should be.
>>
>> I suspect some kind of time-out, but it's just a guess. I haven't fixed nor
>> traced it yet.
>
> Good to know, that i am not the only one. How do you do cyrus auth? Via
> saslauthd or sasl and ldapdb?
> Has anybody else this problem? Can anybody help me to fix it? I like to use
> this setup productive and an login error is not the best for beginning.

I use the following in horde/config/hooks.php:

if (!function_exists('_imp_hook_vinfo')) {
         function _imp_hook_vinfo($type = 'username') {
                 if ($type == 'username') {
                         return preg_replace('/\s/', '', strtolower($_SESSION['imp']['user']));
                 } elseif ($type == 'vdomain') {
                         return '';
                 } else {
                         return PEAR::raiseError('invalid type: ' . $type);
                 }
         }
}


Then I set the following in imp/config/conf.php:

$conf['hooks']['vinfo'] = true;


This hook will lowercase the username entered in the login form before it 
used in Horde/IMP.

We run Cyrus here with saslauthd.  saslauthd is configured to use PAM, and 
we use both pam_unix and pam_ldap together.

 	Andy


More information about the imp mailing list