无法连接到邮件客户端的后缀

我一直在尝试在我的服务器上设置MX,并且能够使用Dovecot在SSL下使用IMAP部分,但是我无法使用Dovecot作为SASL身份validation来使用SMTP部分。

当我telnet example.com 587ehlo给了我以下内容:

 250-example.com 250-PIPELINING 250-SIZE 30720000 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN 

在ehlo中没有身份validation,但是如果我通过openssl s_client -starttls smtp -connect example.com:587执行ehlo openssl s_client -starttls smtp -connect example.com:587 ,我得到以下内容:

 250-example.com 250-PIPELINING 250-SIZE 30720000 250-VRFY 250-ETRN 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN 

而使用'\ 0username \ 0password'的base64的普通login返回OK 。 我认为这里的问题不是SASL,因为用户得到authentication,问题在于连接,但我不知道是什么会导致这样的问题。 由于我的收件人限制不允许非SASLauthentication用户通过,默认的telnet给我一个错误。 如何将SASL添加到默认的非STARTTLS连接,以便我可以将其与我的邮件客户端一起使用?

这是我的main.cf:

 ## SASL smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_sasl_auth_enable = yes smtpd_sasl_authenticated_header = yes ## SSL/TLS smtpd_tls_received_header = yes smtpd_tls_auth_only = yes smtpd_tls_cert_file=/etc/postfix/ssl/smtpd.cert smtpd_tls_key_file=/etc/postfix/ssl/smtpd.key smtpd_tls_ask_ccert = yes smtpd_use_tls=yes smtp_use_tls=yes smtpd_tls_log_level = 2 smtp_tls_note_starttls_offer = yes smtpd_tls_session_cache_timeout = 3600s smtp_tls_protocols = SSLv3, TLSv1 tls_random_source = dev:/dev/urandom message_size_limit = 30720000 smtpd_helo_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_hostname, reject_invalid_hostname, permit smtpd_sender_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, permit smtpd_data_restrictions = reject_unauth_pipelining smtpd_sender_restrictions = reject_unknown_sender_domain mydestination = localhost, example.com mynetworks = 127.0.0.0/8 inet_interfaces = all virtual_transport = lmtp:unix:private/dovecot-lmtp virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 virtual_alias_maps = mysql:/etc/postfix/mysql/virtual_alias_maps.cf virtual_mailbox_domains = mysql:/etc/postfix/mysql/virtual_domain_maps.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf 
  • 编辑:使上一个问题更具体。*

  • 更新:我安装了roundcube并通过客户端发送邮件,它的工作,但是,我仍然无法使用外部服务器的身份validation。

  • 更新#2:当我尝试通过SSL端口587连接到服务器时,发现我的日志文件中有这些行

     warning: dict_nis_init: NIS domain name not set - NIS lookups disabled connect from 93.88.82.66 SSL_accept error from 93.88.82.66: lost connection lost connection after STARTTLS from 93.88.82.66 disconnect from 93.88.82.66 
  • 更新#3:它重新启动后缀和dovecot(不重新加载)

我知道这不是真的回答你的问题,但是:

别。

用你的邮件客户端来代替STARTTLS,正如你所说的,你的服务器可以正常工作。 通过未encryption的连接发送凭证不是一个好主意。

你没有说明你为什么要进行未encryption的SMTPauthentication,所以我只能猜测 – 如果你有一个邮件客户端,不能做STARTTLS(或者,或者,TLS连接从头开始,又名SMTPS,端口465),你应该努力保护客户端,而不是削弱你的服务器端。