I want to use openssl s_client for accessing Gmail POP3S server. I am doing the following:
$ openssl s_client -connect pop.gmail.com:995
+OK Gpop ready for requests from <removed: ip> d11pf35377217wam.36
USER <removed: [email protected]>
+OK send PASS
PASS <removed: password>
+OK Welcome.
LIST
+OK 1 messages (2197 bytes)
1 2197
.
STAT
+OK 1 2197
RETR 1
RENEGOTIATING
The problem is I am never able to execute the RETR command. It always hangs while "RENEGOTIATING".
What am I missing?
I had a similar problem when testing an SSL connection to GMail's SMTP server.
The
AUTH
andMAIL FROM
commands worked fine but when I tried theRCPT TO
the server returned theRENEGOTIATING
response.After searching for quite a bit I finally found a site that explained what was going on.
Apparently the uppercase
R
at the start of the command (RCPT TO
for SMTP andRETR
for POP3) causes the s_client tool to renegotiate with the server.The man page for s_client has some info in the "CONNECTED COMMANDS" section.
I managed to get my SMTP test working by using lowercase commands (
rcpt to
). I've just tried a test with GMail's POP3 server and usingretr 1
works well.