Test Email SNI: Difference between revisions

From Sympl Wiki
Jump to navigation Jump to search
(Created page with "To confirm if your Sympl server has SNI configured for your domains, you can run this quick script.<pre> for domain in `find -L /srv -maxdepth 1 -ty...")
 
mNo edit summary
Line 1: Line 1:
To confirm if your Sympl server has [[Server Name Indication|SNI]] configured for your domains, you can run this quick script.<pre>
To confirm if your Sympl server has [[Server Name Indication|SNI]] configured for your domains, you can run this quick script.<pre>
for domain in `find -L /srv -maxdepth 1 -type d -name '*.*' -print | sed 's|^/srv/||'`; do
for domain in $( find -L /srv -maxdepth 1 -type d -name '*.*' -print | sed 's|^/srv/||' ); do
     echo "$domain"
     echo "$domain"
     ( sleep 0.5; echo . logout ) | openssl s_client -connect localhost:imap -starttls imap -servername $domain 2> /dev/null | openssl x509 -noout -subject | sed 's|subject=CN =|IMAP: |'
     ( sleep 0.5; echo . logout ) | openssl s_client -connect localhost:imap -starttls imap -servername $domain 2> /dev/null | openssl x509 -noout -subject | sed 's|subject=CN =|IMAP: |'

Revision as of 17:33, 10 July 2019

To confirm if your Sympl server has SNI configured for your domains, you can run this quick script.

for domain in $( find -L /srv -maxdepth 1 -type d -name '*.*' -print | sed 's|^/srv/||' ); do
    echo "$domain"
    ( sleep 0.5; echo . logout ) | openssl s_client -connect localhost:imap -starttls imap -servername $domain 2> /dev/null | openssl x509 -noout -subject | sed 's|subject=CN =|IMAP: |'
    ( sleep 0.5; echo quit ) | openssl s_client -connect localhost:smtp -starttls smtp -servername $domain 2> /dev/null | openssl x509 -noout -subject | sed 's|subject=CN =|SMTP: |'
    echo
done