.

OpenSSL s client SMTP


Reading time: less than 1 minute

Debugging problems with email-sending is really annoying. To get to root of the problem, it’s good to start with a very simple base. For SMTP this usually ends up being netcat’ing or telnet’ing into the mail server and sending the usual commands by hand, looking at the responses on each step.

But sometimes the server requires SSL/TLS connections before allowing you to send mails. OpenSSL has a built-in “netcat with TLS” called s_client.

Using STARTTLS

openssl s_client -starttls smtp -crlf -connect example.com:25

Citation

If you find this work useful, please cite it as:
@article{yaltirakli,
  title   = "OpenSSL s client SMTP",
  author  = "Yaltirakli, Gokberk",
  journal = "gkbrk.com",
  year    = "2025",
  url     = "https://www.gkbrk.com/openssl-s-client-smtp"
}
Not using BibTeX? Click here for more citation styles.
IEEE Citation
Gokberk Yaltirakli, "OpenSSL s client SMTP", January, 2025. [Online]. Available: https://www.gkbrk.com/openssl-s-client-smtp. [Accessed Jan. 11, 2025].
APA Style
Yaltirakli, G. (2025, January 11). OpenSSL s client SMTP. https://www.gkbrk.com/openssl-s-client-smtp
Bluebook Style
Gokberk Yaltirakli, OpenSSL s client SMTP, GKBRK.COM (Jan. 11, 2025), https://www.gkbrk.com/openssl-s-client-smtp

Comments

© 2025 Gokberk Yaltirakli