NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

[Helper] expiry-dates.sh to check expiry dates

443cc894
andryyy <[email protected]> 6 years ago
helper-scripts/expiry-dates.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 helper-scripts/expiry-dates.sh

Diff

diff --git a/helper-scripts/expiry-dates.sh b/helper-scripts/expiry-dates.sh
new file mode 100644
index 00000000..8baeee22
--- /dev/null
+++ b/helper-scripts/expiry-dates.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+[[ -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)
+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}
+echo Dovecot: ${POSTFIX}
+echo Nginx: ${POSTFIX}