소스 검색

[Helper] Fix expiry-dates.sh

andryyy 5 년 전
부모
커밋
a54e3ccedf
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      expiry-dates.sh

+ 9 - 0
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}