無法連線到 SMTP 伺服器

無法連線到 SMTP 伺服器

我無法與我的伺服器的 SMTP 伺服器建立連接,它會立即關閉。

telnet x.x.x.x 25
Trying x.x.x.x...
Connected to xxxxxx.xxx.
Escape character is '^]'.
Connection closed by foreign host.

Postfix的main.cf配置:

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtp_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_loglevel = 1
smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem
smtpd_tls_key_file = /etc/ssl/private/postfix.pem
smtpd_tls_auth_only = yes
smtp_tls_security_level = may

郵件日誌(啟用詳細 smtpd):

Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: connection established
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: master_notify: status 0
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: name_mask: resource
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: name_mask: software
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: connect from \[xx.xxx.xx.x]
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_list_match: myisphostname: no match
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_list_match: xx.xxx.xx.x: no match
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_list_match: myisphostname: no match
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_list_match: xx.xxx.xx.x: no match
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_hostname: myisphostname ~? 127.0.0.0/8
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_hostaddr: xx.xxx.xx.x ~? 127.0.0.0/8
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_hostname: myisphostname ~? yy.yy.yyy.y/24
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_hostaddr: xx.xxx.xx.x ~? yy.yy.yyy.y/24
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_list_match: myisphostname: no match
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_list_match: xx.xxx.xx.x: no match
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: send attr request = connect
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: send attr ident = smtp:xx.xxx.xx.x
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: private/anvil: wanted attribute: status
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: input attribute name: status
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: input attribute value: 0
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: private/anvil: wanted attribute: count
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: input attribute name: count
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: input attribute value: 1
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: private/anvil: wanted attribute: rate
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: input attribute name: rate
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: input attribute value: 1
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: private/anvil: wanted attribute: (list terminator)
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: input attribute name: (end)
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: > myisphostname[xx.xxx.xx.x]: 220 mydomain.com ESMTP Postfix
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: smtp_get: EOF
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_hostname: myisphostname ~? 127.0.0.0/8
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_hostaddr: xx.xxx.xx.x ~? 127.0.0.0/8
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_hostname: myisphostname ~? yy.yy.yyy.y/24
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_hostaddr: xx.xxx.xx.x ~? yy.yy.yyy.y/24
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_list_match: myisphostname: no match
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: match_list_match: xx.xxx.xx.x: no match
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: send attr request = disconnect
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: send attr ident = smtp:xx.xxx.xx.x
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: private/anvil: wanted attribute: status
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: input attribute name: status
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: input attribute value: 0
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: private/anvil: wanted attribute: (list terminator)
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: input attribute name: (end)
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: lost connection after CONNECT from myisphostname[xx.xxx.xx.x]
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: disconnect from myisphostname[xx.xxx.xx.x]
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: master_notify: status 1
Nov 28 11:08:32 serverhostname postfix/smtpd[2609]: connection closed

答案1

發現問題所在:Little Snitch 防火牆阻止與 SMTP 伺服器的連線。

(摀臉)

相關內容