Dear Everyone,
I've just installed a courier-imap server into our production
environment, after I played a couple of days in a test environment
(everything went well - with a simple config). An important thing is we
have a working virtual-user mail server with exim4.60 and Qpopper4.0.5
and that environment should be extended with imap capabilities - I'm
just writing it down at first for the sake of let you know changing data
structure or similar actions are unfortunately not an option for me.
Versions: Ubuntu 6.06, courier-authdaemon 0.47-13ubuntu5.1,
courier-authmysql 0.47-13ubuntu5.1, courier-imap 3.0.8-13ubuntu5.1,
mysql 5.0.22
I configured authdaemonrc, authmysqlrc and imapd as well and make all of
it work based on documents found on the net. The only problem is that we
have a one-of-a-kind (but not so strange) data structure for storing
user data so authmysqlrc's fields do not fit for me, therefore I wrote
my own mysql select clause. After that authentication stopped working. :-(
First (working) authmysqlrc:
----------------------------------------------------
MYSQL_SERVER localhost
MYSQL_USERNAME mysqluser
MYSQL_PASSWORD mysqlpassword
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_DATABASE mailauth
MYSQL_USER_TABLE mail_udata
MYSQL_CRYPT_PWFIELD crypt
MYSQL_CLEAR_PWFIELD clear
DEFAULT_DOMAIN mycompany.com
MYSQL_UID_FIELD uid
MYSQL_GID_FIELD gid
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD pop
MYSQL_NAME_FIELD realname
MYSQL_MAILDIR_FIELD smtp
MYSQL_QUOTA_FIELD quota
----------------------------------------------------
telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE
THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION
STARTTLS] Courier-IMAP ready. Copyright 1998-2004 Double Precision, Inc.
See COPYING for distribution information.
A LOGIN [EMAIL PROTECTED] mypassword
A OK LOGIN Ok.
B select INBOX
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 1 EXISTS
* 1 RECENT
* OK [UIDVALIDITY 1163106380] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
B OK [READ-WRITE] Ok
C LOGOUT
* BYE Courier-IMAP server shutting down
C OK LOGOUT completed
My second authmysqlrc (not working):
------------------------------------
MYSQL_SERVER localhost
MYSQL_USERNAME mysqluser
MYSQL_PASSWORD mysqlpassword
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_DATABASE mailauth
MYSQL_USER_TABLE mail_udata
DEFAULT_DOMAIN mycompany.com
MYSQL_SELECT_CLAUSE SELECT mail_udata.username, \
CONCAT('{MD5}', crypt), clear,mail_udata.uid, mail_udata.gid, pop, \
smtp, quota, realname, '' FROM mail_udata, domains WHERE \
mail_udata.localpart = '$(local_part)' AND \
mail_udata.enabled = 1 AND domains.domain = '$(domain)' AND \
vexim_udata.domain_id = domains.domain_id
------------------------------------
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE
THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION
STARTTLS] Courier-IMAP ready. Copyright 1998-2004 Double Precision, Inc.
See COPYING for distribution information.
A LOGIN [EMAIL PROTECTED] mypassword
A NO Login failed.
I traced the query with Mysql's debug function, it seems OK for me. As
the Courier-IMAP doc say, there are 3 steps when a user authenticating
for reading mails: checking user, checking user password and checking
maildir. I guess it's the second where something goes wrong but I cannot
figure it myself. That {MD5} etcetera-part was completely copied from
the example in the default config file... is it necessary at all?
Any help would highly appreciated!
Best regards, Andrei
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap