Improve certificate debug commands (#513)

* Improve certificate debug commands

Simplify.
Distinguish TLS & STARTTLS commands.
Show additional SAN.

* Improve certificate debug commands

Simplify.
Distinguish TLS & STARTTLS commands.
Show additional SAN.
Dieser Commit ist enthalten in:
Raphael 2023-01-07 13:22:32 +01:00 committet von GitHub
Ursprung 43e147969a
Commit be8bbdb978
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 22 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -154,12 +154,18 @@ Um zu überprüfen, ob nginx das richtige Zertifikat verwendet, benutzen Sie ein
Um das von Postfix, Dovecot und Nginx verwendete Zertifikat zu überprüfen, verwenden wir `openssl`:
```
# Verbindung über SMTP (587)
echo "Q" | openssl s_client -starttls smtp -crlf -connect mx.mailcow.email:587
# Verbindung über IMAP (143)
echo "Q" | openssl s_client -starttls imap -showcerts -connect mx.mailcow.email:143
# Verbindung über SMTP STARTTLS (587)
openssl s_client -starttls smtp -connect MAILCOW_HOSTNAME:587 | openssl x509 -noout -text
# Verbindung über SMTP (465)
openssl s_client -connect MAILCOW_HOSTNAME:465 | openssl x509 -noout -text
# Verbindung über IMAP STARTTLS (143)
openssl s_client -starttls imap -connect MAILCOW_HOSTNAME:143 | openssl x509 -noout -text
# Verbindung über IMAP (993)
openssl s_client -connect MAILCOW_HOSTNAME:993 | openssl x509 -noout -text
# Verbindung über HTTPS (443)
echo "Q" | openssl s_client -connect mx.mailcow.email:443
openssl s_client -connect MAILCOW_HOSTNAME:443 | openssl x509 -noout -text
```
Um die von openssl zurückgegebenen Verfallsdaten gegen MAILCOW_HOSTNAME zu validieren, können Sie unser Hilfsskript verwenden:

Datei anzeigen

@ -154,12 +154,18 @@ To check if nginx serves the correct certificate, simply use a browser of your c
To check the certificate served by Postfix, Dovecot and Nginx we will use `openssl`:
```
# Connect via SMTP (587)
echo "Q" | openssl s_client -starttls smtp -crlf -connect mx.mailcow.email:587
# Connect via IMAP (143)
echo "Q" | openssl s_client -starttls imap -showcerts -connect mx.mailcow.email:143
# Connect via SMTP STARTTLS (587)
openssl s_client -starttls smtp -connect MAILCOW_HOSTNAME:587 | openssl x509 -noout -text
# Connect via SMTP (465)
openssl s_client -connect MAILCOW_HOSTNAME:465 | openssl x509 -noout -text
# Connect via IMAP STARTTLS (143)
openssl s_client -starttls imap -connect MAILCOW_HOSTNAME:143 | openssl x509 -noout -text
# Connect via IMAP (993)
openssl s_client -connect MAILCOW_HOSTNAME:993 | openssl x509 -noout -text
# Connect via HTTPS (443)
echo "Q" | openssl s_client -connect mx.mailcow.email:443
openssl s_client -connect MAILCOW_HOSTNAME:443 | openssl x509 -noout -text
```
To validate the expiry dates as returned by openssl against MAILCOW_HOSTNAME, you are able to use our helper script: