From a54e3ccedf09e06feca9b70d9bb10e385daa480d Mon Sep 17 00:00:00 2001 From: andryyy Date: Mon, 1 Jun 2020 21:42:31 +0200 Subject: [PATCH] [Helper] Fix expiry-dates.sh --- expiry-dates.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 expiry-dates.sh diff --git a/expiry-dates.sh b/expiry-dates.sh new file mode 100644 index 00000000..adcd55d8 --- /dev/null +++ b/expiry-dates.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +POSTFIX=$(echo | openssl s_client -connect mail.79v.de:143 -starttls imap 2>/dev/null | openssl x509 -inform pem -noout -enddate | cut -d "=" -f 2) +DOVECOT=$(echo | openssl s_client -connect mail.79v.de:143 -starttls imap 2>/dev/null | openssl x509 -inform pem -noout -enddate | cut -d "=" -f 2) +NGINX=$(echo | openssl s_client -connect mail.79v.de:443 2>/dev/null | openssl x509 -inform pem -noout -enddate | cut -d "=" -f 2) +echo TLS expiry dates: +echo Postfix: ${POSTFIX} +echo Dovecot: ${DOVECOT} +echo Nginx: ${NGINX}