Skip to content
Advertisement

Postfix and OpenJDK 11: “No appropriate protocol (protocol is disabled or cipher suites are inappropriate)”

I know there are some other questions (with answers) to this topic. But none of these was helpful for me.

I have a Postfix server (postfix 3.4.14 on Debian 10 (Buster)) with the following configuration (only the interesting section):

JavaScript

If I check the configuration with OpenSSL, I get (please note that I have made the domain name unrecognizable with “xxxxxx.de”):

JavaScript

Here I’m wondering about the line

JavaScript

because TLSv1/SSLv3 should be disabled by the postfix configuration. Could be that the problem?

However. On the client side I have a Java application (OpenJDK 11.0.11) and every time I will send an email I get:

JavaScript

Of course, I have already edited the conf/security/java.security file. I have added already ECDHE-RSA-AES256-GCM-SHA384 as jdk.tls.legacyAlgorithms. Here are the interesting settings from java.securtity:

JavaScript

May be I’m blind, but I don’t see where my problem is …

Ok, at first I have removed my extensions from jdk.tls.legacyAlgorithms, because these are not helpful and wrong (thanks to dave_thompson_085 for the hint).

Here are the Java code for sending the emails (the code has a “long” history, so please don’t wonder why there are Vector instead of ArrayList or so was used…)

JavaScript

For debugging I have add some System.out’s for output the some interesting values.

Here the standard output:

JavaScript

And standard error:

JavaScript

On the Postfix server side, OpenSSL 1.1.1 is installed:

JavaScript

I don’t believe that Java is using OpenSSL internally, but the client side openssl version (CentOS/RHEL 7) may be also interesting:

JavaScript

Advertisement

Answer

After upgrading JavaMail from 1.4.7 to 1.6.2, the error is gone! I’m sure there are also other clients which use JavaMail 1.4.7 and which works. So there must also be another difference on that machine. However, now it works!

Advertisement