无法连接到587上的后缀

我花了很多时间在这里找相关post的答案,但无济于事。 所以这就是为什么我在这里问这个问题。

  • 我有:Debian 8,Postfix,Dovecot
  • 我可以用roundcube发送和接收电子邮件。
  • 我可以收到雷鸟的电子邮件。
  • 我不能用雷鸟发送邮件。
  • 雷鸟说,它连接到服务器,但它超时,因为没有从服务器的响应。
  • 我禁用了我的防火墙。
  • 我不知道要在服务器名称字段中填写什么。
  • 我试图发送的电子邮件最终在服务器的概念框中

我跟着https://workaround.org/ispmail/jessie

这是我目前的configuration。

config_directory = /etc/postfix inet_interfaces = all mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 milter_default_action = accept milter_protocol = 2 mydestination = server.example.com, localhost.example.com, localhost myhostname = server.example.com mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname non_smtpd_milters = local:/opendkim/opendkim.sock policyd-spf_time_limit = 3600 readme_directory = no recipient_delimiter = + relayhost = smtp_sasl_auth_enable = yes smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) smtpd_milters = local:/opendkim/opendkim.sock smtpd_recipient_restrictions = reject_unauth_destination, check_policy_service unix:private/policyd-spf, permit_sasl_authenticated, permit_mynetworks smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/.ssl/mail_example_com_bundle.crt smtpd_tls_key_file = /etc/.ssl/mail_example_com.key smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3 smtpd_tls_security_level = may smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_transport = lmtp:unix:private/dovecot-lmtp root@server:/etc/dovecot/conf.d# clear root@server:/etc/dovecot/conf.d# postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no config_directory = /etc/postfix inet_interfaces = all mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 milter_default_action = accept milter_protocol = 2 mydestination = server.example.com, localhost.example.com, localhost myhostname = server.example.com mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname non_smtpd_milters = local:/opendkim/opendkim.sock policyd-spf_time_limit = 3600 readme_directory = no recipient_delimiter = + relayhost = smtp_sasl_auth_enable = yes smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) smtpd_milters = local:/opendkim/opendkim.sock smtpd_recipient_restrictions = reject_unauth_destination, check_policy_service unix:private/policyd-spf, permit_sasl_authenticated, permit_mynetworks smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/.ssl/mail_example_com_bundle.crt smtpd_tls_key_file = /etc/.ssl/mail_example_com.key smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3 smtpd_tls_security_level = may smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_transport = lmtp:unix:private/dovecot-lmtp 

postconf | grep smtpd_sasl_auth_enable:

 smtpd_sasl_auth_enable = yes 

postconf | grep smtp_sasl_auth_enable:

 smtp_sasl_auth_enable = yes 

当我使用Telnet连接到端口25时,我得到了来自ehlo的以下响应

 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN 

AUTH未启用。 为什么?

当我尝试使用587上的telnet连接时,我看到一个空白的屏幕。

我没有任何线索。 希望这里有人这样做。

非常感谢。

你需要告诉postfix来听取提交端口。 查看master.cf,通常在/ etc / postfix下,取消注释:

 submission inet n - - - - smtpd 

另外,请检查防火墙设置,以确保端口587可从客户端访问。

提交这是你应该在master.cf东西

 submission inet n - - - - smtpd -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o milter_macro_daemon_name=ORIGINATING 

@cstamas的build议是一个很好的build议。 我注意到在= smtp_sasl_auth_enable = yes中有空格,应该是smtp_sasl_auth_enable=yes然后第一个问题就解决了。

之后,我得到了一个错误'中继访问被拒绝',这是通过添加解决:

  -o smtpd_recipient_restrictions=permit_sasl_authenticated 

在/etc/postfix/master.cf中

然后我在客户端configuration中也有错误。 我应该使用安装了有效证书的服务器名称,以便客户端可以validation服务器身份。