Last active
January 22, 2021 01:37
-
-
Save gwollman/a5b6888fd03e229bf62d9f2641dcfe13 to your computer and use it in GitHub Desktop.
Use openssl s_client to check the TLS certificates of an SMTP server using STARTTLS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo QUIT | openssl s_client -connect "$1":25 -starttls smtp -name "$1" -showcerts -verify 1 -verify_return_error | |
# To send a client certificate, add: | |
# -cert /path/to/cert -key /path/to/key -cert_chain /path/to/chain | |
# for example, if you are using acmetool(1), | |
# acmedir=/var/db/acme/live/$(hostname) | |
# -cert $acmedir/cert -key $acmedir/privkey -cert_chain $acmedir/full_chain |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment