I'm trying to list my imap email folders with openssl s_client:
openssl s_client -quiet -crlf -connect imap.server
It works fine, and I can type in
a capability
b logout
Both commands are executed perfectly. But when I put both commands in a file (I'm on ubuntu16), say "aa.txt" and I pipe this file into openssl, openssl just executes the first command (capability) and hangs, never executing the second one:
cat aa.txt | openssl s_client -quiet -crlf -connect imap.server
Why and how can I execute multiple commands in a file by the imap server through connectssl ?
Thanks !