openssl s_client -starttls smtp -connect mail.XXX.ru:587 | openssl x509 -noout -text
40E75931627F0000:error:8000006E:system library:BIO_connect:Connection timed out:../crypto/bio/bio_sock2.c:125:calling connect()
40E75931627F0000:error:10000067:BIO routines:BIO_connect:connect error:../crypto/bio/bio_sock2.c:127:
connect:errno=110
Could not read certificate from
Unable to load certificate
Попробуй поскать аналоги, прост