2020-06-01 21:10:56 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
[[ -f mailcow.conf ]] && source mailcow.conf
|
|
|
|
[[ -f ../mailcow.conf ]] && source ../mailcow.conf
|
|
|
|
|
2020-07-06 07:06:12 +02:00
|
|
|
POSTFIX=$(echo | openssl s_client -connect ${MAILCOW_HOSTNAME}:25 -starttls smtp 2>/dev/null | openssl x509 -inform pem -noout -enddate | cut -d "=" -f 2)
|
2020-06-01 21:10:56 +02:00
|
|
|
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:
|
|
|
|
echo Postfix: ${POSTFIX}
|
2020-06-01 21:43:28 +02:00
|
|
|
echo Dovecot: ${DOVECOT}
|
|
|
|
echo Nginx: ${NGINX}
|