[imp] Avoiding double login

Mark J Elkins mje at posix.co.za
Thu Oct 30 11:06:16 UTC 2008


I've got SQL authentication running for hoard - and want my users to 
avoid logging in again to read e-mail.

My SQL Authenitication works - but I lack understanding about exactly 
what the system wants - it currently looks like:-

$conf['auth']['params']['query_auth'] = 'SELECT email from useracct 
WHERE email=\L AND password=\P AND status>2';
$conf['auth']['params']['query_add'] = 'insert into useracct 
values(\'\',\L,\L,concat(\L,\'@post.co.zm\'),\'\',\'\',\P,\'\',\'\',\'post.co.zm\',current_timestamp,\'\',\'\',\'\',\'0\',\'\',\'N\',\'\',\'0\',\'0\',\'1000\',\'3\');';
$conf['auth']['params']['query_getpw'] = 'SELECT password FROM useracct 
WHERE email=\L AND status>2';
$conf['auth']['params']['query_update'] = 'UPDATE useracct SET 
password=\P WHERE email=\L';
$conf['auth']['params']['query_resetpassword'] = 'UPDATE useracct SET 
password=\P WHERE email=\L';
$conf['auth']['params']['query_remove'] = 'DELETE FROM useracct WHERE 
email=\L';
$conf['auth']['params']['query_list'] = 'SELECT email FROM useracct';
$conf['auth']['params']['query_exists'] = 'SELECT email FROM useracct 
WHERE email=\L';

I'm not always sure which query is used when - and I have no idea how to 
do things like update the users full name - or other optional values 
like the persons status (ie - are they disabled or enabled). I have some 
external scripts to do these additional things (my own php code) but 
have no idea how I could integrate the two  systems... (anyone have 
examples in this direction?)

In order for "imp" to do this  - I've changed the value of 'hordeauth' 
to 'true' in imp/config/servers.php

This does not quite work - the Domain is getting stripped -  How do I 
*Not* Strip the domain.

Even better - if no domain is given to Hoard - how do I use a default 
domain.
ie - wrt the log entries - I'd like to login as "mje" then have Hoard 
add "@post.co.zm" to the login automagically.

In my Logs - the first problem (of domain stripping) shows as:-

Oct 29 17:09:24 HORDE [notice] [horde] Login success for mje at post.co.zm 
[192.96.28.1] to Horde [pid 8998 on line 138 of 
"/var/www/localhost/htdocs/login.php"]

Oct 29 17:09:42 HORDE [error] [imp] FAILED LOGIN for mje [192.96.28.1] 
(forwarded for [unknown]) to {localhost:143 [imap/notls]} [pid 8998 on 
line 139 of "/var/www/localhost/htdocs/imp/lib/Auth/imp.php"]

-- 
  .  .     ___. .__      Posix Systems - Sth Africa
 /| /|       / /__       mje at posix.co.za  -  Mark J Elkins, SCO ACE, Cisco CCIE
/ |/ |ARK \_/ /__ LKINS  Tel: +27 12 807 0590  Cell: +27 82 601 0496



More information about the imp mailing list