Courier-IMAP / MySQL
Heta,
I am running Woody with postfix, mysql, and courier-imap (and
courier-base, courier-authdaemon, courier-authmysql, courier-pop, and
courier-debug).
Postfix is set up to deliver mail in maildir format based on
information in a mysql database. It delivers mail predictably (though
I had to change some of its configuration parameters to chroot) and
based on the data in mysql.
Courier-IMAP is configured to also use the mysql database for
authentication and to pick up the maildir email, but I can't get it to
authenticate.
# netstat -anp | grep 143
tcp 0 0 0.0.0.0:143 0.0.0.0:*
LISTEN 23502/couriertcpd
# courierauthtest -s imap mmullin@knightsmove.com <mailpass>
Temporary authentication failure from module authdaemon
Authentication FAILED!
# telnet localhost imap
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK Courier-IMAP ready. Copyright 1998-2002 Double Precision, Inc.
See COPYING for distribution information.
aa01 login mmullin@knightsmove.com <mailpass>
aa01 NO Login failed.
# tail /var/log/mysql.log
030104 19:31:38 28 Connect <maildbuser>@localhost on
28 Init DB mail
28 Query SELECT vuser, crypt, clear, uid,
gid, home, maildir, quota, name FROM mailboxes WHERE vuser =
"mmullin@knightsmove.com"
I can log into the database using "mysql -u <maildbuser> -p<maildbpass>
mail" and execute the query above and get a row back.
Here are what I think are the pertinent lines...
...from /etc/courier/authdaemonrc:
authmodulelist="authmysql"
...from /etc/courier/authmysqlrc:
MYSQL_SERVER localhost
MYSQL_USERNAME <maildbuser>
MYSQL_PASSWORD <maildbpass>
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_PORT 0
MYSQL_DATABASE mail
MYSQL_USER_TABLE mailboxes
MYSQL_CRYPT_PWFIELD crypt
MYSQL_CLEAR_PWFIELD clear
MYSQL_UID_FIELD uid
MYSQL_GID_FIELD gid
MYSQL_LOGIN_FIELD vuser
MYSQL_HOME_FIELD home
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir
MYSQL_QUOTA_FIELD quota
finally, here is from within the database:
mysql> desc mailboxes;
+---------+------------------+
| Field | Type |
+---------+------------------+
| vuser | varchar(255) |
| maildir | varchar(255) |
| crypt | varchar(16) |
| clear | varchar(16) |
| name | varchar(128) |
| uid | int(10) unsigned |
| gid | int(10) unsigned |
| home | varchar(13) |
| quota | varchar(255) |
+---------+------------------+
What am I doing wrong? Is there anything more I can do to gather
information? (I admit I don't know how to use traces, but I'm willing
to learn!)
Please help. It all looks correct to me, and I've tried many different
things (including changing MYSQL_PORT to 3306), but I would very much
like to hear if someone else has this working or if someone knows where
I'm being a dunderhead.
Thanks,
Mickey
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Reply to: