Hi -

I am trying to move my courier authentication from system users to
postgresql auth.
I am using the debian packages for courier from testing, configured the
authpgsqlrc file and verified settings in authdaemond.

from authdaemond:
authmodulelist="authpam authpgsql"

and from authpgsqlrc:
PGSQL_HOST snarg
PGSQL_USERNAME admin
PGSQL_PASSWORD admin
PGSQL_PORT 5432
PGSQL_DATABASE courier
PGSQL_USER_TABLE passwd
#PGSQL_CRYPT_PWFIELD crypt
PGSQL_CLEAR_PWFIELD clear
# DEFAULT_DOMAIN example.com
PGSQL_UID_FIELD uid
PGSQL_GID_FIELD gid
PGSQL_LOGIN_FIELD id
PGSQL_HOME_FIELD home
PGSQL_NAME_FIELD name
# PGSQL_MAILDIR_FIELD maildir
# PGSQL_QUOTA_FIELD quota


I created my courier database in postgres and added the table passwd:
courier=# \d passwd
Table "passwd"
Attribute | Type | Modifier
-----------+----------------+------------------------
id | character(128) | not null default ''
crypt | character(128) | not null default ''
clear | character(128) | not null default ''
name | character(128) | not null default ''
uid | integer | not null default 65534
gid | integer | not null default 65534
home | character(255) | not null default ''
maildir | character(255) | not null default ''
quota | character(255) | not null default ''
Index: id_id

I then inserted a test record into the database
insert into passwd (id,clear,uid,gid,home) values
('test','test',1009,100,'/home/test');
and verified that /home/test existed and was owned by the proper uid/gid

I restarted authdaemond and made sure it was running the pgsql version

testing the connection now with pop3
snarg:~# telnet 0 110
Trying 0.0.0.0...
Connected to 0.0.0.0.
Escape character is '^]'.
+OK Hello there.
user test
+OK Password required.
pass test
-ERR Login failed.
quit
+OK Better luck next time.
Connection closed by foreign host

so I check the postgres logs and I see that it is connecting to the db and
selecting properly:
DEBUG: connection: host=127.0.0.1 user=admin database=courier
DEBUG: query: SELECT id, '', clear, uid, gid, home, '', '', name FROM
passwd WHERE id = 'test'

in my mail.log I get:
Feb 28 23:33:59 snarg courierpop3login: Connection, ip=[::ffff:127.0.0.1]
Feb 28 23:34:08 snarg courierpop3login: LOGIN FAILED, ip=[::ffff:127.0.0.1]
Feb 28 23:34:10 snarg courierpop3login: Disconnected, ip=[::ffff:127.0.0.1]

I am stuck at this point as I can see that courier is connecting to my
database and retrieving a record, but still gets a login failed.
What do I do next?
Thanks,

Tim









_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to