启用 TLS 后传入 Hotmail 连接超时

启用 TLS 后传入 Hotmail 连接超时

好吧,这让我完全困惑了。我尝试了很多方法来解决这个问题,但我束手无策。

6 月初,我维护的服务器突然决定停止接受来自某些 hotmail 服务器的传入 TLS 连接。我认为这可能是由于自签名证书造成的,因此我切换到了 StartSSL 的 Class 1 证书,但问题仍然存在。

以下是日志文件中的详细交易(某些值,例如 TLS 握手已被修改):

Jun 12 18:19:27 [servername] postfix/smtpd[4839]: initializing the server-side TLS engine
Jun 12 18:19:27 [servername] postfix/smtpd[4839]: connect from snt004-omc1s40.hotmail.com[65.54.61.77]
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: setting up TLS connection from snt004-omc1s40.hotmail.com[65.54.61.77]
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: snt004-omc1s40.hotmail.com[65.54.61.77]: TLS cipher list "aNULL:-aNULL:ALL:

+RC4:@STRENGTH"
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: SSL_accept:before/accept initialization
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: read from 7F04A4A693C0 [7F04A4A6F420] (11 bytes => -1 (0xFFFFFF4345FFFFFFF))
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: read from 7F04A4A693C0 [7F04A4A6F420] (11 bytes => 11 (0xB))
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: 0000 16 03 03 00 7c 01 00 00|78 03 03                 ....|... x..
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: read from 7F04A4A693C0 [7F04A4A6F42E] (118 bytes => 47 (0x2F))
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: 0000 53 99 62 99 99 58 5e fa|7e e3 bf 80 15 0e f8 ac  S.b..X^. ~.......
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: xxx 2a 9a 32 e3 6d 71 5e 40|dc e1 e0 0b 70 4a 17 46  xxxq^@ ....pJ.F
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: 0020 00 00 26 00 3c 00 3d 00|2f 00 35 00 05 00 0a     ..&.<.=. /.5....
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: read from 7F04A4A693C0 [7F04A4A6F45D] (71 bytes => -1 (0xFFFFFFFFFFFFFFFF))
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: read from 7F04eee3C0 [7F04A4A6F45D] (71 bytes => 37 (0x25))
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: 0000 c0 2c ff 24 c0 27 c0 0a|c0 09 c0 14 c0 13 c0 2b  .,zzzzzz .......+
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: 0010 c0 23 00 6a 00 40 00 13|00 04 01 00 00 29 ff 01  .#.j.@.. .....)..
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: 0020 00 01 00 00 0a                                   .....
Jun 12 18:19:28 [servername] postfix/smtpd[4839]: read from 7F04A4A693C0 [7F04A4A6F482] (34 bytes => -1 (0xFFFFFFFFFFFFFFFF))

---Five minute interval---

Jun 12 18:24:28 [servername] postfix/smtpd[4839]: SSL_accept error from snt004-omc1s40.hotmail.com[65.54.61.77]: Connection timed out
Jun 12 18:24:28 [servername] postfix/smtpd[4839]: lost connection after STARTTLS from snt004-omc1s40.hotmail.com[65.54.61.77]
Jun 12 18:24:28 [servername] postfix/smtpd[4839]: disconnect from snt004-omc1s40.hotmail.com[65.54.61.77]

让这些电子邮件发送出去的唯一方法是在 main.cf 中完全禁用 TLS

这是我的 main.cf,供参考:

# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
delay_warning_time = 4h
unknown_local_recipient_reject_code = 450
maximal_queue_lifetime = 7d
minimal_backoff_time = 1000s
maximal_backoff_time = 8000s
smtp_helo_timeout = 120s
smtpd_recipient_limit = 50
smtpd_soft_error_limit = 3
smtpd_hard_error_limit = 12
smtpd_helo_required = yes
smtpd_delay_reject = yes
disable_vrfy_command = yes
readme_directory = no

# SASL
smtpd_sasl_auth_enable = yes
# If your potential clients use Outlook Express or other older clients
# this needs to be set to yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
#smtpd_sasl_local_domain =

# TLS parameters
# smtp_use_tls = no
smtp_tls_security_level = may
smtpd_tls_security_level = none
smtpd_tls_auth_only = no
smtpd_tls_loglevel = 4
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom


smtpd_tls_cert_file=/etc/ssl/private/sslxxx/mail.server.com.au.crt
smtpd_tls_key_file=/etc/ssl/private/sslxxx/mail.server.com.au.key

smtpd_tls_CAfile = /etc/ssl/private/sslxxx/sub.class1.server.ca.pem
smtp_tls_CAfile = $smtpd_tls_CAfile


# Requirements for the HELO statement
smtpd_helo_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_host
name, reject_invalid_hostname, permit
# Requirements for the sender details
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, warn_i
f_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pip
elining, permit
# Requirements for the connecting server
smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org, reject_rbl_clien
t blackholes.easynet.nl
# Requirement for the recipient address
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_pipelini
ng, permit_mynetworks, reject_non_fqdn_recipient, reject_unknown_recipient_domai
n, reject_unauth_destination, permit
smtpd_data_restrictions = reject_unauth_pipelining

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.server.com.au
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
virtual_mailbox_base = /raid/mail/virtual
virtual_mailbox_maps = mysql:/etc/postfix/mysql_mailbox.cf
virtual_alias_maps = mysql:/etc/postfix/mysql_alias.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_domains.cf
myorigin = /etc/mailname
mydestination =
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 204857600000
recipient_delimiter = +
inet_interfaces = all
local_recipient_maps =
mynetworks_style = host
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
message_size_limit = 72914560
virtual_mailbox_limit = 204857600000

如果有人知道是什么原因造成的,我将不胜感激。非常感谢。

答案1

我们遇到了同样的问题。这个问题似乎大约一个月前开始的。来自 hotmail 和其他一些邮箱的电子邮件永远无法建立 TLS 连接。

看一眼http://ubuntuforums.org/showthread.php?t=2230387

关闭防火墙上对端口 25 的扫描后,问题就解决了。我知道这不是最好的解决方案,但它可能会让你走上正确的道路。

相关内容