我使用Postfix 2.11.3-1和OpenSSL 1.0.2k-1运行Debian Jessie邮件服务器。 最近Debian政策的变化已经使几个不安全的密码失效了。 不幸的是,我们收到邮件的一些邮件服务器仍旧在旧版本的Exchange上运行(我认为Windows Server 2003上的Exchange 2007),现在由于TLS握手失败而无法连接。 以下是发送服务器支持的非常有限的密码:
tls1: RC4-SHA tls1: RC4-MD5 tls1: DES-CBC3-SHA
我无法控制其configuration。 根据http://www.postfix.org/TLS_README.html#server_cipher ,“… Windows 2003 Microsoft Exchange服务器的DES-CBC3-SHA的实现存在缺陷,OpenSSL认为它比RC4-SHA更强大。套件select可能会与Windows 2003 Microsoft Exchange客户端产生互操作性问题。“
这里是我们Postfixconfiguration的相关行,由postconf | grep smtpd_tls postconf | grep smtpd_tls :
smtpd_tls_CAfile = smtpd_tls_CApath = smtpd_tls_always_issue_session_ids = yes smtpd_tls_ask_ccert = no smtpd_tls_auth_only = yes smtpd_tls_ccert_verifydepth = 9 smtpd_tls_cert_file = /path/to/cert smtpd_tls_ciphers = export smtpd_tls_dcert_file = smtpd_tls_dh1024_param_file = smtpd_tls_dh512_param_file = smtpd_tls_dkey_file = $smtpd_tls_dcert_file smtpd_tls_eccert_file = smtpd_tls_eckey_file = $smtpd_tls_eccert_file smtpd_tls_eecdh_grade = strong smtpd_tls_exclude_ciphers = smtpd_tls_fingerprint_digest = md5 smtpd_tls_key_file = /path/to/key smtpd_tls_loglevel = 0 smtpd_tls_mandatory_ciphers = medium smtpd_tls_mandatory_exclude_ciphers = smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 smtpd_tls_protocols = !SSLv2, !SSLv3 smtpd_tls_received_header = yes smtpd_tls_req_ccert = no smtpd_tls_security_level = may smtpd_tls_session_cache_database = sdbm:/var/lib/postfix/smtpd_scache smtpd_tls_session_cache_timeout = 3600s smtpd_tls_wrappermode = no
目前看来,我们唯一的select可能是完全禁用TLS,直到发送服务器升级。 显然我并不热衷于这样做,但放弃电子邮件不是一种select。 是否有可能重新configurationPostfix临时启用RC4-SHA *? 如果我们能把它放在最低优先级上,那就更好了。 这是一个生产性的邮件服务器,所以testing的范围是有限的,我需要一个我可以确信的解决scheme,可以直接工作,所以我们不会丢失邮件。
提前致谢。
*理由是它比RC4-MD5更好,而DES-CBC3-SHA将不起作用。
回答我自己的问题,以防他人帮忙。 我在http://postfix.1071664.n5.nabble.com/selective-disable-of-smtpd-opportunistic-TLS-tp81383p81384.html的Postfix论坛上发现了一个解决方法。 /etc/postfix/main.cf下行添加到/etc/postfix/main.cf :
smtpd_discard_ehlo_keyword_address_maps = cidr:/etc/postfix/ehlo-map.cidr
文件/etc/postfix/ehlo-map.cidr的内容应该如下所示,用有问题的服务器使用的地址范围replace1.2.3.4/32 :
# Disable TLS for <X> as their server uses outdated ciphers 1.2.3.4/32 starttls
由于两个原因,此解决scheme并不理想。 首先,它完全禁用从有问题的IP地址收到的电子邮件的TLS。 RC4-SHA可能不再被认为是强大的,但仍然比发送所有未encryption的更好。 其次,您不能为电子邮件域或服务器主机名指定它,而必须知道IP地址。
我将等待几天,然后将其作为公认的答案,希望有人能提出一个更好的解决scheme。 我理想地寻找的东西就像smtp_tls_policy_maps除了smtpd,但不幸的smtpd_tls_policy_maps不是一个实际的configuration选项。