我正在专用硬件上安装一个CentOS 7安装邮件服务器,我遇到了让Postfix通过Dovecot为SASL设置SMTP连接的问题。 我已经遵循了关于编辑main.cf和master.cf以及Dovecot的.conf文件的每个指南。
其他一切都运行良好。 我已经设立了达夫科特(Dovecot),并且安全地进行了authentication,没有问题。 SMTP工作正常,如果我设置smtpd_tls_auth_only = no但密码显然发送明确。
我已经运行openssl s_client -connect sub.domain.com:25 -starttls smtp来检查,它正确地返回证书,一切似乎是好的。 运行ehlo sub.domain.com之后,返回:
250-sub.domain.com 250-PIPELINING 250-SIZE 20480000 250-ETRN 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN
我认为这是TLS“握手”后的预期。
当我尝试使用邮件客户端进行连接时,拖拽日志给了我以下内容: 请参阅粘贴
当我尝试发送时,OS X中的邮件告诉我以下内容:
邮件无法使用默认端口上的SSL连接到服务器“sub.domain.com”。 确认此服务器支持SSL并且您的帐户设置是正确的。
我试图通过所有的标准端口连接。
Roundcube给我一个错误代码250:身份validation失败。
编辑:下面是postconf -n的输出:
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 delay_warning_time = 4 disable_vrfy_command = yes dovecot_destination_recipient_limit = 1 html_directory = no inet_interfaces = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man message_size_limit = 20480000 mydestination = localhost.$mydomain, localhost mydomain = domain.com myhostname = sub.domain.com mynetworks = 127.0.0.1, xxx.xxx.xxx.xxx newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.2.2/README_FILES recipient_delimiter = + relay_domains = proxy:mysql:/etc/sentora/configs/postfix/mysql-relay_domains_maps.cf sample_directory = /usr/share/doc/postfix-2.2.2/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_tls_loglevel = 4 smtp_tls_security_level = may smtpd_banner = $myhostname ESMTP smtpd_client_restrictions = smtpd_data_restrictions = reject_unauth_pipelining smtpd_helo_required = yes smtpd_helo_restrictions = smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_path = /var/spool/postfix/private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_sender_restrictions = permit_mynetworks, reject_unauth_destination, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_recipient_domain smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem smtpd_tls_key_file = /etc/ssl/private/postfix.pem smtpd_tls_received_header = yes smtpd_use_tls = yes soft_bounce = yes unknown_local_recipient_reject_code = 550 virtual_alias_maps = proxy:mysql:/etc/sentora/configs/postfix/mysql-virtual_alias_maps.cf, regexp:/etc/sentora/configs/postfix/virtual_regexp virtual_gid_maps = static:12 virtual_mailbox_base = /var/sentora/vmail virtual_mailbox_domains = proxy:mysql:/etc/sentora/configs/postfix/mysql-virtual_domains_maps.cf virtual_mailbox_maps = proxy:mysql:/etc/sentora/configs/postfix/mysql-virtual_mailbox_maps.cf virtual_minimum_uid = 996 virtual_transport = dovecot virtual_uid_maps = static:996
和postconf -M在: 这个粘贴
如果有更多的日志或confs我需要粘贴在这里请问,我会很乐意提供。 任何事情要得到这该死的安全工作! 哎呀!
所以,事实certificate,我有点傻。 我尝试从我的工作以外的networking(通过我的移动提供商)连接,连接工作!
错误:
邮件无法使用默认端口上的SSL连接到服务器“sub.domain.com”。 确认此服务器支持SSL并且您的帐户设置是正确的。
在使用STARTTLS时显示,但在OS X Mail中selectSSL选项。 由于您没有使用SSL,因此它应该会失败。
在这种情况下,问题不是服务器或服务器防火墙上的configuration错误,而是由于某种原因在我们的networking上运行的Cyberoam设备阻塞了连接。 没有SMTP限制,但是由于SMTP不适用于任何其他邮件提供商(除了我们的商业邮件),因此必须在某处存在错误configuration。 尽pipe如此,解决scheme已经超出了这个问题的范围。
所以,虽然现在看起来应该是我第一次排除故障的步骤,但是如果发生这种情况,首先尝试从另一个networking连接来检查您的设置,特别是在使用Cyberoam的情况下。