2013年(1)
分类: LINUX
2013-08-06 10:21:14
为排除其它因素,最小化安装Centos 6.4系统,并关闭SELinux ,闭关防火墙,然后进行如下配置:
/etc/sysconfig/saslauthd内容只有两行:
SOCKETDIR=/var/run/saslauthd
FLAGS=sasldb
/etc/sasl2/smtpd.conf内容有三行:
pwcheck_method: auxprop
auxprop_plugin: sasldb
mech_list: plain login
[root@centos ~]# service saslauthd start
Starting saslauthd: [ OK ]
创建帐号:
[root@centos ~]# saslpasswd2 -c xyz -u abc.com
Password: (输入密码abc)
Again (for verification):
[root@centos ~]# sasldblistusers2
xyz@abc.com: userPassword
测试:
[root@centos ~]# testsaslauthd -u xyz -p abc
0: NO "authentication failed"
[root@centos ~]# testsaslauthd -u xyz@abc.com -p abc
0: NO "authentication failed"
但如果创建了系统用户xyz及相应的密码,使用系统帐号测试则成功,感觉就是没使用/etc/sasldb2数据库帐号。
[root@centos ~]# ps aux | grep saslauthd
root 1207 0.0 0.1 8768 780 ? Ss 11:41 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a shadow sasldb
日志:
tail /var/log/messages
Aug 6 10:23:52 centos saslauthd[1208]: do_auth : auth failure: [user=xyz] [service=imap] [realm=] [mech=shadow] [reason=Unknown]
Aug 6 10:23:59 centos saslauthd[1212]: do_auth : auth failure: [user=xyz@abc.com] [service=imap] [realm=] [mech=shadow] [reason=Unknown]
求解?