Hi Dude, this is simple way when i am use openssl, and want to check expiration SSL from terminal.
openssl x509 -enddate -noout -in /path-where-ssl-stored/fullchain.pem
When i am used “lets encrypt“, and want to check expired date :
[root@smtp ~]# cd /etc/letsencrypt/live/smtp.domainku.net/
[root@smtp smtp.domainku.net]# openssl x509 -enddate -noout -in fullchain.pem
notAfter=Apr 23 03:48:36 2018 GMT
And then, below is command to test smtp server in localhost is use ssl/tls or not.
openssl s_client -connect localhost:587 -starttls smtp