Hi,
The short story is my courier pop3d can't authenticate against my mysql.
The long story:
OS: Ubuntu Dapper
Versions:
MySQL 5.0.22
courier 0.47-13
I have the following courier packages installed:
courier-authdaemon
courier-authmysql
courier-base
courier-pop
courier-pop-ssl
courier-ssl
=============================
authdaemonrc file:
authmodulelist="authmysql"
authmodulelistorig="authcustom authcram authuserdb authldap authpgsql
authmysql authpam"
daemons=5
version="authdaemond.mysql"
authdaemonvar=/var/run/courier/authdaemon
==============================
authmysqlrc file:
MYSQL_SERVER 127.0.0.1
MYSQL_USERNAME mail
MYSQL_PASSWORD password
MYSQL_PORT 3306
MYSQL_OPT 0
MYSQL_DATABASE maildb
MYSQL_USER_TABLE users
#MYSQL_CRYPT_PWFIELD crypt
MYSQL_CLEAR_PWFIELD clear
MYSQL_UID_FIELD uid
MYSQL_GID_FIELD gid
MYSQL_LOGIN_FIELD id
MYSQL_HOME_FIELD home
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD concat(home,'/',maildir)
MYSQL_WHERE_CLAUSE enabled=1
===============================
pop3d file:
PIDFILE=/var/run/courier/pop3d.pid
MAXDAEMONS=40
MAXPERIP=4
AUTHMODULES="authdaemon"
AUTHMODULES_ORIG="authdaemon"
DEBUG_LOGIN=2
POP3AUTH="LOGIN"
POP3AUTH_ORIG="LOGIN CRAM-MD5 CRAM-SHA1"
POP3AUTH_TLS="LOGIN PLAIN"
POP3AUTH_TLS_ORIG="LOGIN PLAIN"
PORT=110
ADDRESS=0
TCPDOPTS="-nodnslookup -noidentlookup"
POP3DSTART=YES
MAILDIRPATH=Maildir
=================================
mail.log file:
Nov 15 09:49:34 swing1 authdaemond.mysql: restarting authdaemond children
Nov 15 09:49:34 swing1 authdaemond.mysql: modules="authmysql", daemons=5
Nov 15 09:49:37 swing1 authdaemond.mysql: modules="authmysql", daemons=5
Nov 15 09:49:53 swing1 courierpop3login: Connection, ip=[::ffff:127.0.0.1]
Nov 15 09:50:02 swing1 courierpop3login: LOGIN: DEBUG:
ip=[::ffff:127.0.0.1], command=USER
Nov 15 09:50:07 swing1 courierpop3login: LOGIN: DEBUG:
ip=[::ffff:127.0.0.1], command=PASS
Nov 15 09:50:07 swing1 courierpop3login: LOGIN: DEBUG:
ip=[::ffff:127.0.0.1], [EMAIL PROTECTED]
Nov 15 09:50:07 swing1 courierpop3login: LOGIN: DEBUG:
ip=[::ffff:127.0.0.1], password=testpass123
Nov 15 09:50:07 swing1 courierpop3login: authdaemon: starting client module
Nov 15 09:50:07 swing1 courierpop3login: authdaemon: TEMPFAIL - no
more modules will be tried
Nov 15 09:50:12 swing1 courierpop3login: LOGIN FAILED, ip=[::ffff:127.0.0.1]
=================================
mysql.log
061115 10:35:40 38 Connect [EMAIL PROTECTED] on
38 Init DB maildb
38 Query SELECT id, "", clear, uid, gid,
home, concat(home,'/',maildir), "", name, "" FROM users WHERE id =
"[EMAIL PROTECTED]" AND (enabled=1)
==================================
mysql query output(The uid/gid 5000 owns /virtual/root):
[EMAIL PROTECTED],"",testpass123,5000,5000,"",/virtual/root/,"",root,""
==================================
authenumerate output:
# authdaemon
[EMAIL PROTECTED] 5000 5000 /virtual/root/
===================================
courierauthtest output:
# courierauthtest [EMAIL PROTECTED] testpass123
Trying authdaemon...
Temporary authentication failure from module authdaemon
Authentication FAILED!
===================================
courier processes:
# ps -ef | grep courier
root 6991 1 0 09:49 ? 00:00:00 /usr/sbin/couriertcpd
-pid=/var/run/courier/pop3d.pid -stderrlogger=/usr/sbin/courierlogger
-maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup -address=0 110
/usr/lib/courier/courier/courierpop3login
/usr/lib/courier/authlib/authdaemon
/usr/lib/courier/courier/courierpop3d Maildir
root 6993 1 0 09:49 ? 00:00:00
/usr/sbin/courierlogger courierpop3login
root 7379 4336 0 10:57 tty1 00:00:00 strace -f -F -s1024 -o
/tmp/out /etc/init.d/courier-authdaemon start
root 7390 1 0 10:57 ? 00:00:00
/usr/sbin/courierlogger -pid=/var/run/courier/authdaemon/pid -start
/usr/lib/courier/authlib/authdaemond.mysql
root 7391 7390 0 10:57 ? 00:00:00
/usr/lib/courier/authlib/authdaemond.mysql
root 7393 7391 0 10:57 ? 00:00:00
/usr/lib/courier/authlib/authdaemond.mysql
root 7394 7391 0 10:57 ? 00:00:00
/usr/lib/courier/authlib/authdaemond.mysql
root 7395 7391 0 10:57 ? 00:00:00
/usr/lib/courier/authlib/authdaemond.mysql
root 7396 7391 0 10:57 ? 00:00:00
/usr/lib/courier/authlib/authdaemond.mysql
root 7397 7391 0 10:57 ? 00:00:00
/usr/lib/courier/authlib/authdaemond.mysql
root 7482 1 0 11:35 ? 00:00:00 /usr/sbin/couriertcpd
-pid=/var/run/courier/pop3d-ssl.pid
-stderrlogger=/usr/sbin/courierlogger -stderrloggername=pop3d-ssl
-maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup -address=0 995
/usr/bin/couriertls -server -tcpd
/usr/lib/courier/courier/courierpop3login
/usr/lib/courier/authlib/authdaemon
/usr/lib/courier/courier/courierpop3d Maildir
root 7484 1 0 11:35 ? 00:00:00
/usr/sbin/courierlogger pop3d-ssl
===============================
authdaemond strace output (tail):
7397 write(6, "\7\0\0\0\2maildb", 11) = 11
7397 read(6, "\7\0\0\1\0\0\0\2\0\0\0", 16384) = 11
7397 poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0
7397 write(6, "\204\0\0\0\3SELECT id, \"\", clear, uid, gid, home,
concat(home,\'/\',maildir), \"\", name, \"\" FROM users WHERE id =
\"[EMAIL PROTECTED]" AND (enabled=1)", 136) = 136
7397 read(6, "[EMAIL
PROTECTED],\0\0\5\3def\6maildb\5users\5users\3uid\3uid\f?\0\5\0\0\0\2!\0\0\0\0,\0\0\6\3def\6maildb\5users\5users\3gid\3gid\f?\0\5\0\0\0\2!\0\0\0\0.\0\0\7\3def\6maildb\5users\5users\4home\4home\f\10\0\377\0\0\0\375\1\0\0\0\0.\0\0\10\3def\0\0\0\30concat(home,\'/\',maildir)[EMAIL
PROTECTED]/virtual/root/\0\4root\0\5\0\0\16\376\0\0\2\0",
16384) = 510
7397 close(4) = 0
7397 select(6, [3 5], NULL, NULL, {300, 0}
==================================
courierauthtest strace output (tail):
write(2, "Trying authdaemon...\n", 21Trying authdaemon...
) = 21
brk(0) = 0x804d000
brk(0x806e000) = 0x806e000
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE,
path="/var/run/courier/authdaemon/socket"}, 110) = 0
fcntl64(3, F_SETFL, O_RDONLY) = 0
select(4, NULL, [3], NULL, {15, 0}) = 1 (out [3], left {15, 0})
write(3, "AUTH [EMAIL PROTECTED]", 47) = 47
time([1163609859]) = 1163609859
time([1163609859]) = 1163609859
select(4, [3], NULL, NULL, {15, 0}) = 1 (in [3], left {15, 0})
read(3, "", 8191) = 0
close(3) = 0
select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout)
write(2, "Temporary authentication failure from module authdaemon\n",
56Temporary authentication failure from module authdaemon
) = 56
write(2, "Authentication FAILED!\n", 23Authentication FAILED!
) = 23
exit_group(1) = ?
===============================
Any ideas?
Thanks in advance,
Yonah
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users