LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1085|回复: 2

courier imap can't auth. imap and pop3

[复制链接]
发表于 2005-12-11 15:48:01 | 显示全部楼层 |阅读模式
I setup a mail server using followings components

postfix 2.2.6
sasl
pam-mysql
courier-auth 0.58
courier-imap 4.0.6
mysql 5.0.16

email user is authenicated against mysql backend db
I added a test account in db and I tested the smtp auth and it works (i.e. can authenticate against db)
but I failed to test with imap and pop3

# telnet localhost 110
Trying 127.0.0.1...
Connected to NS1 (127.0.0.1).
Escape character is '^]'.
+OK Hello there.
user adrian@mydomain.com
+OK Password required.
pass 123456
-ERR Temporary problem, please try again later
Connection closed by foreign host.

the maillog shown
Dec 10 17:37:05 NS1 pop3d: Connection, ip=[::ffff:127.0.0.1]
Dec 10 17:37:17 NS1 pop3d: LOGIN FAILED, user=adrian@mydomain.com, ip=[::ffff: 127.0.0.1]
Dec 10 17:37:17 NS1 pop3d: authentication error: Input/output error


# telnet localhost 143
Trying 127.0.0.1...
Connected to NS1 (127.0.0.1).
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc. See COPYING for distribution information.
a login adrian@mydomain 123456
* BYE Temporary problem, please try again later
Connection closed by foreign host.

the maillog shown
Dec 10 17:42:27 NS1 imapd: Connection, ip=[::ffff:127.0.0.1]
Dec 10 17:42:38 NS1 imapd: LOGIN FAILED, user=adrian@mydomain.com, ip=[::ffff: 127.0.0.1]
Dec 10 17:42:38 NS1 imapd: authentication error: Input/output error

authdaemonrc config is, others remains by default values
authmodulelist="authpam authmysql"

authmysqlrc config is
MYSQL_SERVER localhost
MYSQL_USERNAME postfixuser
MYSQL_PASSWORD userpostfix
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD home
MYSQL_MAILDIR_FIELD maildir

/etc/pam.d/pop3
auth sufficient pam_mysql.so user=postfixuser passwd=userpostfix host=localhost db=postfix t
able=mailbox usercolumn=username passwdcolumn=password crypt=1
account required pam_mysql.so user=postfixuser passwd=userpostfix host=localhost db=postfix
table=mailbox usercolumn=username passwdcolumn=password crypt=1

/etc/pam.d/imap
auth sufficient pam_mysql.so user=postfixuser passwd=userpostfix host=localhost db=postfix t
able=mailbox usercolumn=username passwdcolumn=password crypt=1
account required pam_mysql.so user=postfixuser passwd=userpostfix host=localhost db=postfix
table=mailbox usercolumn=username passwdcolumn=password crypt=1
发表于 2005-12-12 04:45:36 | 显示全部楼层
show 一下你的mailbox表的内容
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-14 08:05:01 | 显示全部楼层
I fixed the problem. It's due the premission of directory
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表