E-mail Notifier – 'TLS11 is not accepted' error

I use an Office365 SMTP host for e-mail notifications. Checking server logs, these stopped being sent on 7 September. The error I receive is as follows:

Failed to send email notification with subject 'TeamCity email notification test' to address '******', error: javax.mail.MessagingException: Could not convert socket to TLS;
  nested exception is:
	javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS11 is not accepted by client preferences [TLS12, SSL20Hello]

 

(I replaced the real e-mail address with asterisks in the above.)

As suggested in some other posts I've seen, I tried creating a System Environment Variable 'TEAMCITY_SERVER_OPTS' and setting its value to

-Dmail.smtp.ssl.protocols="TLSv1.2"

before restarting the TeamCity server, but this did not appear to have any effect.

Can anyone suggest how I might resolve this problem? Thank you.

0
2 comments

Hello Philparkin,

I would suggest you to check the following:

  1. Check the Office 365 SMTP settings to be sure that TLS 1.2 is enabled;
  2. Please check if the parameter you have set (Dmail.smtp.ssl.protocols) is being picked up by the process in TeamCity under Administration - Diagnostics - Java configuration;
  3. Which versions of Java and TeamCity are you using? There was a recent upgrade of java which disabled TLS protocols under TLS 1.2 due to security restrictions. So if you are using a very old version of Java (or TeamCity), upgrading might solve the issue;

Please let me know if these suggestions help you to solve this issue. 

0

Thank you very much for responding.

I was able to resolve the problem by rebooting the TC server, after setting the TEAMCITY_SERVER_OPTS environment variable. Without a reboot, the variable was ignored.

1

Please sign in to leave a comment.