Test Email SNI

From Sympl Wiki
Revision as of 17:11, 10 July 2019 by Kelduum (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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