I would like to force a own set of TLS cipher suites rather than use the Postfix built in ones.
My desired set of ciphers is (taken from nginx configuration):
ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:-DES:!RC4:!MD5:!PSK:!aECDH:EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
Unfortunately I cannot find a reference to override the cipher suites. I found notices that it is possible but not how.
How would look like the equivalent Postfix configuration for smtp
and smtpd
?
Using Debian/7, Postfix/2.11.2, OpenSSL/1.0.1e
From Applied Crypto Hardening by bettercrypto.org:
[UPDATE: As the bettercrypto project, where I have the cipher-string from, is no longer active, make sure to chose your cipher-string from a current source.]
For
master.cf
you may want to configure the submission port to TLS only:However, this does not disallow usage of outdated ciphers for security level may, according to pull request #97, you can do this with:
But this has not been merged with the following reason:
man postconf
says "You are strongly encouraged to not change this setting."Nevertheless, you can, like this:
I assume this is experimental and you're not worried about mail flow from most MTAs. Check for "handshake failure" in the postfix logs. I'd suggest testing with smtp_ outgoing first so you can see what's in the queue and any local nginx-generated SMTP sessions shouldn't fail.
It is well documented. From http://www.postfix.org/TLS_README.html#server_cipher