On Sun, 2 Feb 2003 04:25:09 -0800 (PST) Onno <[EMAIL PROTECTED]> wrote:

> I had a look at a mysql log of my courier-imap
> installation. And to authenticate 1 user it uses only
> 1 query (as it should)

i read the faq, and there is a place where this is explained. There are, in
fact, 3 queries... 1 to look for the user in the database, one for the
alias/domain/virtual redirection and another for the password confirmation.

I see only one. and it is just like yours.

> Query:       SELECT id, crypt, clear, uid, gid, home,
> "", "", name FROM users WHERE id = "JohnDoe"
> 
> In regard to debugging info....  you can turn on a
> debugging option in etc/imapd .... set DEBUG_LOGIN=2
> and the username and password will show up in you
> maillog (Remember to turn this off after your done)...

yes, i have it like that already, but it does not tell me much... all it
says is (like):

Feb  2 01:02:04 gateway imapd: Connection, ip=[::ffff:192.168.0.1]
Feb  2 01:02:04 gateway imapd: LOGIN: DEBUG: ip=[::ffff:192.168.0.1], 
command=CAPABILITY
Feb  2 01:02:04 gateway imapd: LOGIN: DEBUG: ip=[::ffff:192.168.0.1], command=LOGIN
Feb  2 01:02:04 gateway imapd: LOGIN: DEBUG: ip=[::ffff:192.168.0.1], username=testuser
Feb  2 01:02:04 gateway imapd: LOGIN: DEBUG: ip=[::ffff:192.168.0.1], password=password
Feb  2 01:02:09 gateway imapd: LOGIN FAILED, ip=[::ffff:192.168.0.1]
Feb  2 01:02:09 gateway imapd: LOGIN: DEBUG: ip=[::ffff:192.168.0.1], command=LOGOUT
Feb  2 01:02:09 gateway imapd: LOGOUT, ip=[::ffff:192.168.0.1]
 
and the sql log for the same failure is as follows:

030202  1:02:04      20 Connect     courier_user@localhost on
                     20 Init DB     maildb
                     20 Query       SELECT id, crypt, clear, uid, gid,
home, maildir, quota, name FROM users WHERE id = "testuser" AND (imapok=1 AND mailok=1)

more sql info:

mysql> select id,address,crypt,name,uid,gid,home,imapok,mailok from maildb.users;      
                                    
+----------+---------------------------+------------------+---------------+------+------+----------------+--------+--------+
| id       | address                   | crypt            | name          | uid  | gid 
| | home           | imapok | mailok |
+----------+---------------------------+------------------+---------------+------+------+----------------+--------+--------+
| testuser | testuser@FQDN             | 5d2e19393cc5ef67 | test user     | 1001 | 
|1001 | /home/testuser |      1 |      1 |
+----------+---------------------------+------------------+---------------+------+------+----------------+--------+--------+
1 row in set (0.01 sec)

mysql>

(please note that the logged query can be successfully executed, so i know
the query is valid AND it returns a result - maybe i am wrong... but with
the data i have, i guess the query is ok)

this is like a real user in the system (testuser). it is not because of security
considerations (i changed username+password) but settings are coherent. In
the case i present, password("password") matches the table i show you, so
this is a good forgery!!

> if this doen't help solving the problem post the
> relevant config and log files, maybe somebody can spot
> your problem that way....

here you are!

thank you for the help. i am still getting auth failures like:

root@gateway:~$ telnet localhost 143
Trying ::1...
telnet: connect to address ::1: No route to host
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK Courier-IMAP ready. Copyright 1998-2003 Double Precision, Inc.  See COPYING for 
distribution information.
. login testuser password
. NO Login failed.
. logout
* BYE Courier-IMAP server shutting down
. OK LOGOUT completed
Connection closed by foreign host.
root@gateway:~$ 

the running processes are ok:

root@gateway:~$ ps ax | grep mysql
  681  p0  S      0:00.02 
/usr/local/services/courier-imap-1.7.0/libexec/authlib/authdaemond.mysql start
  683  p0  S      0:00.04 
/usr/local/services/courier-imap-1.7.0/libexec/authlib/authdaemond.mysql start
  684  p0  S      0:00.04 
/usr/local/services/courier-imap-1.7.0/libexec/authlib/authdaemond.mysql start
  685  p0  S      0:00.04 
/usr/local/services/courier-imap-1.7.0/libexec/authlib/authdaemond.mysql start
  686  p0  S      0:00.03 
/usr/local/services/courier-imap-1.7.0/libexec/authlib/authdaemond.mysql start
  687  p0  S      0:00.04 
/usr/local/services/courier-imap-1.7.0/libexec/authlib/authdaemond.mysql start
  474 con- I      0:00.05 /bin/sh 
/usr/local/services/mysql-4.0.9-gamma/bin/mysqld_safe 
--datadir=/var/services/mysql-4.0.9
  494 con- S      0:05.57  (mysqld)
root@gateway:~$ 

all i have left to show are the configuration files:

authmysqlrc:
authmodulelist="authmysql"
authmodulelistorig="authcustom authcram authuserdb authmysql authpam"
version="authdaemond.mysql"

authdaemonrc:
AUTHMODULES="authdaemon"

(i think the relevant is here. if you find somwthing missing, please say
so)

thanks for the help.

[]











-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to