我需要连接到 Dyn 邮件中继,我正在使用他们的知识库。
我正在尝试通过 telnet 到端口 25 连接到我的 postfix 服务器。
这是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
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
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
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
relayhost = smtp.dynect.net:25
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
unknown_local_recipient_reject_code = 550
/var/log/邮件日志
Aug 6 05:52:09 jira postfix/postfix-script[14415]: stopping the Postfix mail system
Aug 6 05:52:09 jira postfix/master[13461]: terminating on signal 15
Aug 6 05:52:11 jira postfix/postfix-script[14508]: starting the Postfix mail system
Aug 6 05:52:11 jira postfix/master[14510]: daemon started -- version 2.10.1, configuration /etc/postfix
Aug 6 05:53:46 jira postfix/smtpd[14514]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug 6 05:58:56 jira postfix/smtpd[14514]: timeout after AUTH from confluence.radwarecloud.com[10.65.60.22]
Aug 6 05:58:56 jira postfix/smtpd[14514]: disconnect from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:15:28 jira postfix/smtpd[15079]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:15:46 jira postfix/smtpd[15079]: lost connection after UNKNOWN from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:15:46 jira postfix/smtpd[15079]: disconnect from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:15:47 jira postfix/smtpd[15079]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:17:12 jira postfix/postfix-script[15125]: stopping the Postfix mail system
Aug 6 12:17:12 jira postfix/master[14510]: terminating on signal 15
Aug 6 12:17:14 jira postfix/postfix-script[15218]: starting the Postfix mail system
Aug 6 12:17:14 jira postfix/master[15220]: daemon started -- version 2.10.1, configuration /etc/postfix
Aug 6 12:17:24 jira postfix/smtpd[15223]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:18:25 jira postfix/smtpd[15223]: lost connection after AUTH from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:18:25 jira postfix/smtpd[15223]: disconnect from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:18:26 jira postfix/smtpd[15223]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:19:09 jira postfix/postfix-script[15309]: stopping the Postfix mail system
Aug 6 12:19:09 jira postfix/master[15220]: terminating on signal 15
Aug 6 12:19:11 jira postfix/postfix-script[15401]: starting the Postfix mail system
Aug 6 12:19:11 jira postfix/master[15403]: daemon started -- version 2.10.1, configuration /etc/postfix
Aug 6 12:19:18 jira postfix/smtpd[15406]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:24:24 jira postfix/smtpd[15406]: timeout after AUTH from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:24:24 jira postfix/smtpd[15406]: disconnect from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:28:55 jira postfix/postfix-script[15438]: stopping the Postfix mail system
Aug 6 12:28:55 jira postfix/master[15403]: terminating on signal 15
Aug 6 12:28:57 jira postfix/postfix-script[15529]: starting the Postfix mail system
Aug 6 12:28:57 jira postfix/master[15531]: daemon started -- version 2.10.1, configuration /etc/postfix
Aug 6 12:29:03 jira postfix/smtpd[15534]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:30:33 jira postfix/postfix-script[15559]: stopping the Postfix mail system
Aug 6 12:30:33 jira postfix/master[15531]: terminating on signal 15
Aug 6 12:30:34 jira postfix/postfix-script[15651]: starting the Postfix mail system
Aug 6 12:30:34 jira postfix/master[15653]: fatal: /etc/postfix/master.cf: line 36: no valid IP address found: smtp
Aug 6 12:30:35 jira postfix/master[15652]: fatal: daemon initialization failure
Aug 6 12:30:36 jira postfix/postfix-script[15654]: fatal: mail system startup failed
Aug 6 12:31:46 jira postfix/postfix-script[15757]: starting the Postfix mail system
Aug 6 12:31:46 jira postfix/master[15759]: daemon started -- version 2.10.1, configuration /etc/postfix
Aug 6 12:32:01 jira postfix/smtpd[15762]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:37:10 jira postfix/smtpd[15762]: timeout after AUTH from confluence.radwarecloud.com[10.65.60.22]
Aug 6 12:37:10 jira postfix/smtpd[15762]: disconnect from confluence.radwarecloud.com[10.65.60.22]
我发现 /var/log/messages 中出现以下错误:
Blockquote saslauthd[11378]: do_auth : auth failure: [user=XXX] [service=smtp] [realm=XXX.com] [mech=pam] [reason=PAM auth error]
在 /var/log/maillog 中我得到:
SASL login authentication failed: authentication failure
我忘了什么?
答案1
您需要了解Postfix 中smtpd
和之间的区别smtp
。简而言之,smtpd
SMTP 服务器是收到电子邮件和smtp
SMTP 客户端发送电子邮件。
根据上面链接的文章,则需要添加以下三个参数进去main.cf
:
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options
不幸的是,postconf -n
输出不同:
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options =
你注意到这两个代码片段之间的区别了吗?太棒了。所以修复拼写错误,你的问题就解决了。
答案2
我从 Ubuntu 10.04 迁移到 14.04 时遇到了此错误症状。一旦我将 smtpd_sasl_type 从 cyrus 更改为 dovecot,它就可以正常工作。更改后您必须重新启动 postfix 服务。