dovecot mysql_dovecot+mysql认证问题

这篇博客记录了一位用户在配置Dovecot邮件服务器时遇到的MySQL认证问题。用户在尝试使用MySQL进行POP3登录时,尽管查询到正确的用户名和密码,但在获取UID时遇到错误。通过修改Dovecot的SQL配置文件,特别是调整`user_query`来正确获取UID和GID,以解决这个问题。
摘要由CSDN通过智能技术生成

本帖最后由 qscf_520 于 2010-08-11 14:53 编辑

Aug 11 14:22:07 auth(default): Info: client in: AUTH    1       PLAIN   service=pop3    lip=192.168.1.200       rip=123.16.136.30 lport=110        rport=1645      resp=AHF1c29uZzcAJDEkcGh6MW1ScmokM29rNkJqZWFvSllXREJzRVBaYjVDMA==

Aug 11 14:22:07 auth-worker(default): Info: sql(qusong7,123.16.136.30): query: select username as user,password from mailbox where username = 'qusong7' and active='1'

Aug 11 14:22:07 auth(default): Info: client out: OK     1       user=qusong7

Aug 11 14:22:07 auth(default): Info: master in: REQUEST 2       5080    1

Aug 11 14:22:07 auth-worker(default): Info: sql(qusong7,123.16.136.30): select maildir as home,uidnumber as uid ,gidnumber as gid from mailbox where username='qusong7' and active='1'

[fly][fly]Aug 11 14:22:07 auth(default): Info: master out: USER   2       qusong7 home=/home/domains/gzshenzhen.com/qusong7/Maildir/        uidnumber=1000     mailbox=1000[/fly][/fly]

Aug 11 14:22:07 dovecot: Error: User qusong7 is missing UID (see mail_uid setting)

Aug 11 14:22:07 pop3-login: Info: Internal login failure (auth failed, 1 attempts): user=, method=PLAIN, rip=123.16.136.30, lip=192.168.1.200

Aug 11 14:22:08 auth(default): Info: new auth connection: pid=5081

重新改了配置文件:

[root@mail wiki]# cat /usr/local/dovecot/etc/dovecot-sql.conf

driver = mysql

connect = host=/tmp/mysql.sock dbname=extmail user=root password=12345678

#default_pass_scheme = MD5

default_pass_scheme = PLAIN

#password_query = select username as user,password from mailbox where substring(username,1,instr(username,'@')-1) = '%n' and active='1'

password_query = select username as user,password from mailbox where username = '%u' and active='1'

user_query = select maildir as home,uidnumber as uid ,gidnumber as gid from mailbox where username='%u' and active='1'

作者: qscf_520

发布时间: 2010-08-11

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值