Simone Nanni wrote:
Hi everybody,
i'm trying to install courier-authlib-0.58 on my SlackWare 10.2 with kernel 2.6.16.16 box that should work with a MySQL 5.0.21 database.
I've compiled it in this way:
 
./configure --prefix=/usr/local/courierauth --with-gnu-ld --without-authuserdb --without-authpam --without-authldap --without-authpwd --without-authshadow --without-authchkpw --without-authpgsql --without-authcustom --without-authpipe --with-authmysql --with-mysql-libs=/usr/local/mysql/lib/mysql --with-mysql-includes=/usr/local/mysql/include/mysql
ok
 
Then i've created a table named "mailbox" in "postfix" database that contains:
 
mysql> describe mailbox;
+----------+--------------+------+-----+---------------------+-------+
| Field    | Type         | Null | Key | Default             | Extra |
+----------+--------------+------+-----+---------------------+-------+
| username | varchar(255) | NO   | PRI | NULL                |       |
| password | varchar(255) | NO   |     | NULL                |       |
| name     | varchar(255) | NO   |     | NULL                |       |
| maildir  | varchar(255) | NO   |     | NULL                |       |
| quota    | int(10)      | NO   |     | 0                   |       |
| domain   | varchar(255) | NO   |     | NULL                |       |
| created  | datetime     | NO   |     | 0000-00-00 00:00:00 |       |
| modified | datetime     | NO   |     | 0000-00-00 00:00:00 |       |
| active   | tinyint(1)   | NO   |     | 1                   |       |
| uid      | varchar(5)   | YES  |     | NULL                |       |
| gid      | varchar(5)   | YES  |     | NULL                |       |
+----------+--------------+------+-----+---------------------+-------+
so 'ive configured my authmysqlrc file:
 
MYSQL_SERVER            127.0.0.1
I vaguely recall this giving me trouble one time, seems mysql doesn't always consider 127.0.0.1 == localhost so users that can only auth to mysql locally would be rejected here.  Might try changing it to localhost instead.

MYSQL_PORT              3306
MYSQL_USERNAME          postfix
MYSQL_PASSWORD          postfix
MYSQL_OPT               0
MYSQL_DATABASE          postfix
MYSQL_TABLE             mailbox
MYSQL_CLEAR_PWFIELD     password
MYSQL_LOGIN_FIELD       username
MYSQL_HOME_FIELD        '/usr/local/virtual'
MYSQL_NAME_FIELD        name
MYSQL_MAILDIR_FIELD     maildir
MYSQL_UID_FIELD         '1001'
MYSQL_GID_FIELD         '1001'
 
This is looking for a field name not a literal value.  You should set these to be uid and gid as that is the tables you created above, then put 1001 in the database field.

(i've checked username and password a loooooooooot of times!)
 
but when i run "authtest" command i always obtain:
 
Authentication FAILED: Input/output error
 
Logging the MySQL queries i can see:
 
060523 18:01:45      11 Connect     [EMAIL PROTECTED] on
                              11 Init DB     postfix
and no more............
 
Why??? Somebody can help me please, i'm becoming crazy!!!!
Thanx a lot in advance.
set DEBUG_LOGIN=2 in etc/authlib/authdaemonrc and restart authlib.  Then watch your maillog for error messages (note that this will log passwords).  If your mysql query is failing this will show why.

Jay
begin:vcard
fn:Jay Lee
n:Lee;Jay
org:Philadelphia Biblical University;Information Technology Department
email;internet:[EMAIL PROTECTED]
title:Network / Systems Administrator
x-mozilla-html:FALSE
version:2.1
end:vcard

Reply via email to