Postfix,Dovecot – 从外部连接,authentication

我想在我的服务器上运行postfix + dovecot。 我是第一次这样做。 Postfix和Dovecot在本地工作 – 我可以通过telnet连接,并使用命令发送/接收电子邮件。 当我尝试从外部连接时,使用邮件客户端(在我的情况下,Thunderbird),我总是看到客户端警报: Authentication failed

我的/ var / log / maillog文件说:

dovecot: pop3-login: Disconnected: Shutting down (auth failed, 6 attempts): user=<test.user>, method=PLAIN, rip=xxx.xxx.xxx, lip=xxx.xxx.xxx

发行是CentOS 6

编辑( postconf -n ):

 alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 home_mailbox = Maildir/ html_directory = no inet_interfaces = all inet_protocols = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydomain = mydomain.com myhostname = host.mydomain.com mynetworks = xxx.xxx.xxx/24 127.0.0.0/8 mynetworks_style = subnet myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES sample_directory = /usr/share/doc/postfix-2.6.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop unknown_local_recipient_reject_code = 550 

当我想从Thunderbird向外部主机发送电子邮件时,我得到5.7.1 <[email protected]>: Relay access denied

错误日志: NOQUEUE: reject: RCPT from my_vps_domain[xxx.xxx.xxx.xxx]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<[127.0.0.1]> NOQUEUE: reject: RCPT from my_vps_domain[xxx.xxx.xxx.xxx]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<[127.0.0.1]>

你应该发布你的10-auth.conf和所有auth * snippetconfiguration文件的内容。 有许多事情可能会出错。 您可以在这里开始排除故障

http://wiki2.dovecot.org/TestPop3Installation

您可以使用“auth_debug”和“auth_verbose”指令打开debugging日志logging。

http://wiki2.dovecot.org/Debugging/Au​​thentication

这里解释你的问题的第二部分:

在这里,后缀拒绝尝试通过邮件客户端发送错误“中继访问被拒绝”的电子邮件。 这意味着thunderbird不会尝试执行SMTP AUTH,因此不允许使用configurationpermit_sasl_authenticated

根据postconf -n的输出,你似乎没有在后缀中启用SASLauthentication。 这就是为什么雷鸟不authentication自己,从而导致电子邮件被拒绝。

你可以在postfix官方文档中find关于启用SASL的教程。