Hello =)

I recently setup post fix and courier-imap on my beloved mailserver (and shortly thereafter, and thus currently, installed the entire courier mta package, which did not solve anything, but seems to be a better way to go.). I decided to implement mysql, so I could have database-driven web based email, and thus eventually provide webmail signup services, that would be all automatic, with virtual users.

However, I ran into a problem. Initially, I couldn't get any of the users to authenticate, but eventually I managed to configure it such that if a user existed in both my unix user database, *AND* the mysql database, authmysqlrc would read from the mysql database, and provide mail services. I could, of course, implement authdaemon.plain and get all services without mysql, but using authmysql, I have not been able to set up entirely virtual users through mysql (even with manually created maildirs) that actually work. all of them fail on login.

Also, a strange 405 "Service not available" error crops up once in a while, giving me the impression (according to courier's FAQ) that courier will not speak to mysql, although the mysql service is running, and port 3306 is listed as open and waiting for connections. For the moment, though, the most pressing issue seems to be the fact that I need both UNIX authentication mechanisms and mysql - I haven't been able to properly wean myself of traditional UNIX authentication mechanisms!

Surely I'm forgetting something that will be blindingly obvious in retrospect, but, well, for the time being, I'm stuck. Any pointers would be vastly appreciated. I'll send snippets from any config files that might clarify the situation.

#authmysqlrc
MYSQL_SERVER            localhost
MYSQL_USERNAME          courier
MYSQL_PASSWORD          ************
MYSQL_SOCKET            /tmp/mysql.sock
MYSQL_PORT              3306
MYSQL_DATABASE          maildb
MYSQL_USER_TABLE        users
MYSQL_CRYPT_PWFIELD     crypt
#MYSQL_CLEAR_PWFIELD    clear
MYSQL_LOGIN_FIELD       id
MYSQL_HOME_FIELD        home
MYSQL_NAME_FIELD        name
#MYSQL_MAILDIR_FIELD    maildir
MYSQL_UID_FIELD         uid
MYSQL_GID_FIELD         gid
DEFAULT DOMAIN          dimension-4.dnsalias.net
MYSQL_QUOTA_FIELD       quota

mysql> SHOW COLUMNS FROM users in maildb;
+-------+------------------+------+-----+---------+-------+
| Field | Type             | Null | Key | Default | Extra |
+-------+------------------+------+-----+---------+-------+
| id    | char(128)        |      | MUL |         |       |
| crypt | char(128)        |      |     |         |       |
| clear | char(128)        |      |     |         |       |
| name  | char(128)        |      |     |         |       |
| uid   | int(10) unsigned |      |     | 1010    |       |
| gid   | int(10) unsigned |      |     | 1010    |       |
| home  | char(255)        |      |     |         |       |
| quota | char(255)        |      |     |         |       |
+-------+------------------+------+-----+---------+-------+
8 rows in set (0.00 sec)

I've been using phpmyadmin, and for crypt, I've been using the insert option, then using ENCRYPT with my password
the result,


id crypt clear name uid gid home quota
[EMAIL PROTECTED] HKyaC6gw0QY0Y $1$h2.KCQeE$dIpBZCo79ZsQ44oXVk80I0 TFox 1010 1010 /usr/local/virtual/tfox 10000




-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to