This happened way too often, so I'll write it down as a quick reminder:
Openssl in s_client mode will renegotiate a connection whenever a line starts with the letter
- which is an especially bad choice when you're using it to connect to an smtp server.
~# openssl s_client -host smtp.hushmail.com -port 465
220 smtp.hushmail.com ESMTP Postfix
MAIL FROM: firstname.lastname@example.org
250 2.1.0 Ok
RCPT TO: email@example.com
depth=2 /C=US/O=Entrust.net/OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Secure Server Certification Authority
verify error:num=19:self signed certificate in certificate chain
So every time you try to enter
RCPT the connection will be renegotiated, rendering it useless for sending mail
- as a sidenote
Q should also be avoided..
Since I always look it up, here it is once and for all:
would be the correct way to go.
openssl s_client -ign_eof -crlf -host $host -port $port