/ 中存储网

CentOS6 sendmail outlook 解决不断提示用户密码登录错误

2014-12-22 12:58:13 来源:中存储网

linux sendmail 服务器建立以后。使用telnet能够登录,但是outlook不能登录

outlook: 登录邮件服务器时出错。“用户名”被拒绝。 帐户: 'mail.qiaorong.com', 服务器: 'mail.qiaorong.com', 协议: POP3, 服务器响应: '-ERR Plaintext authentication disallowed on non-secure (SSL/TLS) connections.', 端口: 110, 安全(SSL): 否, 服务器错误: 0x800CCC90, 错误号: 0x800CCC91
/var/log/maillog 日志如下:
Oct 28 08:52:54 qiaorong dovecot: imap(qiaorong): Error: user qiaorong: Initialization failed: mail_location not set and autodetection failed: Mail storage autodetection failed with home=/home/qiaorong
Oct 28 08:52:54 qiaorong dovecot: imap(qiaorong): Error: Invalid user settings. Refer to server log for more information.
Oct 28 08:54:23 qiaorong dovecot: master: Warning: Killed with signal 15 (by pid=1455 uid=0 code=kill)
Oct 28 08:54:24 qiaorong dovecot: master: Dovecot v2.0.beta6 (3156315704ef) starting up (core dumps disabled)
Oct 28 08:57:43 qiaorong dovecot: imap-login: Disconnected: Inactivity (tried to use disabled plaintext auth): rip=192.168.1.21, lip=192.168.1.16, mpid=0
Oct 28 09:00:33 qiaorong dovecot: imap-login: Disconnected (no auth attempts): rip=192.168.1.21, lip=192.168.1.16, mpid=0
Oct 28 09:27:24 qiaorong dovecot: pop3-login: Disconnected (tried to use disabled plaintext auth): rip=192.168.1.21, lip=192.168.1.16, mpid=0
Oct 28 09:27:26 qiaorong dovecot: pop3-login: Disconnected (tried to use disabled plaintext auth): rip=192.168.1.21, lip=192.168.1.16, mpid=0

解决方法: 

唉。整了这么多天终于自己整出来了,欣欣然。这个问题主要原因是mail_location not set and autodetection failed 两个问题关于第一个mail_location ,在/etc/dovecot/conf.d目录下有一个10-mail.conf的文件。内容如下:
#   mail_location = maildir:~/Maildir
    mail_location = mbox:~/mail:INBOX=/var/mail/%u
#   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
取消注释
关于第二个问题。还是dovecot的问题,找到/etc/dovecot/dovecot.conf 文档,编辑里面的内容
protocols = imap pop3 lmtp
disable_plaintext_auth=no
ssl_disable = no
取消注释,并添加你的文件中或许没有的内容。

 

[root@rhel6 ~]# tail -f /var/log/maillog
Dec 21 16:51:00 rhel6 dovecot: pop3-login: Aborted login (tried to use disabled plaintext auth): rip=192.168.50.211, lip=192.168.50.24, mpid=0

5:设置/etc/dovecot/conf.d/10-mail.conf配置文件如下:
[root@rhel6 ~]# grep -v ‘^#’ /etc/dovecot/conf.d/10-mail.conf |grep -v ‘^$’ |grep -v ‘#’
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mbox_write_locks = fcntl

如未设置mail_location参数值,将会出现如下错误:
freebsd# telnet 192.168.50.24 110
Trying 192.168.50.24…
Connected to 192.168.50.24.
Escape character is ‘^]’.
+OK Dovecot ready.
user oracle
+OK
pass oracle
Connection closed by foreign host.

[root@rhel6 ~]# tail -f /var/log/maillog
Dec 21 16:52:50 rhel6 dovecot: pop3-login: Login: user=, method=PLAIN, rip=192.168.50.211, lip=192.168.50.24, mpid=9826, secured
Dec 21 16:52:50 rhel6 dovecot: pop3(oracle): Error: user oracle: Initialization failed: mail_location not set and autodetection failed: Mail storage autodetection failed with

home=/u01/oracle
Dec 21 16:52:50 rhel6 dovecot: pop3(oracle): Error: Invalid user settings. Refer to server log for more information.