Richard wei Richard wei - 4 months ago 37
Perl Question

My sendmail log get TLS setup failed

I setup my nagios in docker container,and It working.and sendmail can send mail to me.

I find it can't send message to me one day,and I see the Log of sendmail,I get this error

nagios[15471]: ERROR => TLS setup failed: SSL connect attempt failed because of handshake problems error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure

during this time,I just stop and restart my nagios container

the packages of libio-socket-ssl-perl and libnet-ssleay-perl perl also have installed.

How can I slove this problem??

Thanks very much


If you mean with this script with the last update from 2009 then you are using unsupported and broken software. It might work if you change the following line in the script:

-   if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv3 TLSv1')) {
+   if (! IO::Socket::SSL->start_SSL($SERVER)) {

Reason for this change is that the setting of SSL_version in the code was wrong from the beginning, only that 7 years ago IO::Socket::SSL did not complain about it but simply used the first setting SSLv3. But since 4 years IO::Socket::SSL is stricter and complains about the wrong usage. Apart from that SSLv3 would not work in many cases anyway today because the protocol is disabled for security reasons.