From cb1ea703e229754bb1d69dba381e862d93ef221d Mon Sep 17 00:00:00 2001 From: fherbert Date: Mon, 6 Jul 2020 17:06:12 +1200 Subject: [PATCH] Check port 25 and use smtp protocol to check postfix certificate. Fixes #3636 (#3637) --- helper-scripts/expiry-dates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helper-scripts/expiry-dates.sh b/helper-scripts/expiry-dates.sh index ff8d08bf..1554b709 100644 --- a/helper-scripts/expiry-dates.sh +++ b/helper-scripts/expiry-dates.sh @@ -3,7 +3,7 @@ [[ -f mailcow.conf ]] && source mailcow.conf [[ -f ../mailcow.conf ]] && source ../mailcow.conf -POSTFIX=$(echo | openssl s_client -connect ${MAILCOW_HOSTNAME}:143 -starttls imap 2>/dev/null | openssl x509 -inform pem -noout -enddate | cut -d "=" -f 2) +POSTFIX=$(echo | openssl s_client -connect ${MAILCOW_HOSTNAME}:25 -starttls smtp 2>/dev/null | openssl x509 -inform pem -noout -enddate | cut -d "=" -f 2) DOVECOT=$(echo | openssl s_client -connect ${MAILCOW_HOSTNAME}:143 -starttls imap 2>/dev/null | openssl x509 -inform pem -noout -enddate | cut -d "=" -f 2) NGINX=$(echo | openssl s_client -connect ${MAILCOW_HOSTNAME}:443 2>/dev/null | openssl x509 -inform pem -noout -enddate | cut -d "=" -f 2) echo TLS expiry dates: