1

I'm running a Debian Jessie mailserver using Postfix 2.11.3-1 with OpenSSL 1.0.2k-1. Recent changes to Debian policy have disabled several older insecure ciphers. Unfortunately some of the mailservers from which we receive mail are still running on an old version of Exchange (I think Exchange 2007 on Windows Server 2003), and they're now unable to connect due to TLS handshake failures. Here are the (very limited) ciphers supported by the sending server:

tls1:   RC4-SHA
tls1:   RC4-MD5
tls1:   DES-CBC3-SHA

I have no control over its configuration. According to http://www.postfix.org/TLS_README.html#server_cipher, "... Windows 2003 Microsoft Exchange servers have flawed implementations of DES-CBC3-SHA, which OpenSSL considers stronger than RC4-SHA. Enabling server cipher-suite selection may create interoperability issues with Windows 2003 Microsoft Exchange clients."

Here are the relevant lines of our Postfix config as produced by 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

At the moment it's looking like our only option might be to completely disable TLS until the sending servers get upgraded. Obviously I'm not keen to do that, but dropping the email is not an option. Is it possible to reconfigure Postfix to temporarily enable RC4-SHA*? If we can set it to the lowest priority, so much the better. It's a production mail server so the scope for testing is limited, I need a solution that I can be confident will work straight off so we don't lose mail.

Thanks in advance.

*On the grounds that it's better than RC4-MD5, and DES-CBC3-SHA won't work.

1
  • Just found smtpd_discard_ehlo_keyword_address_maps at postfix.1071664.n5.nabble.com/…, which might suffice, but it's less than ideal as it has to be configured using IP addresses rather than hostnames or domains.
    – Kitserve
    Feb 1, 2017 at 17:54

1 Answer 1

0

Answering my own question, in case it's helpful to others. I found a workaround on the Postfix forums at http://postfix.1071664.n5.nabble.com/selective-disable-of-smtpd-opportunistic-TLS-tp81383p81384.html. Add the following line to /etc/postfix/main.cf:

smtpd_discard_ehlo_keyword_address_maps = cidr:/etc/postfix/ehlo-map.cidr

The contents of the file /etc/postfix/ehlo-map.cidr should then be as follows, substituting 1.2.3.4/32 with the address range used by the problematic servers:

# Disable TLS for <X> as their server uses outdated ciphers
1.2.3.4/32 starttls

This solution isn't ideal for two reasons. First, it disables TLS completely for email received from the IP addresses in question. RC4-SHA might not be considered all that strong anymore, but it's still better than sending everything unencrypted. Second, you can't specify it for an email domain or server hostname, instead you have to know the IP address(es).

I'm going to wait a couple of days before marking this as the accepted answer, in the hope that someone will come up with a better solution. What I'm ideally looking for is something like smtp_tls_policy_maps except for smtpd, but unfortunately smtpd_tls_policy_maps isn't an actual configuration option.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .