Hello,
When I telnet to my pop3 server and "QUIT" this is what I see:
Escape character is '^]'. +OK InterMail POP3 server ready. QUIT +OK ? InterMail POP3 server signing off. Connection closed by foreign host.
When I setup an stunnel 4.5 to the same pop3 server: [pop3s] accept = 995 connect = server:110
and connect with "openssl s_client -connect localhost:995" this is what I see:
+OK InterMail POP3 server ready. QUIT DONE
And the stunnel log reports:
Connection closed: 34 bytes sent to SSL, 0 bytes sent to socket
What happened to the last line "+OK ? InterMail POP3 server signing off." and why aren't the counters counting the 5 bytes I sent ("QUIT\n") and the last line of 41 sent over the SSL?
Example 2 through stunnel: +OK InterMail POP3 server ready. USER -ERR a user name MUST be entered QUIT DONE
Connection closed: 68 bytes sent to SSL, 5 bytes sent to socket (still missing the last bytes)
Arthur Murray wrote:
When I setup an stunnel 4.5 to the same pop3 server:
There is no stunnel version 4.5. I guess you mean either version 4.05 (released Feb 2004), or 4.50 (released Dec 2011).
Connection closed: 34 bytes sent to SSL, 0 bytes sent to socket
I tried really hard to reproduce your issue, but it works just fine on each of the three machines I used for testing.
Please send us: - The output of "stunnel -version", and - All lines of stunnel debug log (enable debug logging with "debug = 7") corresponding to this connection.
Mike
On Fri, Dec 16, 2011 at 7:53 AM, Michal Trojnara Michal.Trojnara@mirt.net wrote:
Arthur Murray wrote:
When I setup an stunnel 4.5 to the same pop3 server:
There is no stunnel version 4.5. I guess you mean either version 4.05 (released Feb 2004), or 4.50 (released Dec 2011).
4.50
Connection closed: 34 bytes sent to SSL, 0 bytes sent to socket
I tried really hard to reproduce your issue, but it works just fine on each of the three machines I used for testing.
Please send us: - The output of "stunnel -version", and - All lines of stunnel debug log (enable debug logging with "debug = 7") corresponding to this connection.
Mike
I have put all of it here:
On Fri, Dec 16, 2011 at 9:32 AM, Arthur Murray amurrayfsf@gmail.com wrote:
I tried really hard to reproduce your issue, but it works just fine on each of the three machines I used for testing.
Please send us: - The output of "stunnel -version", and - All lines of stunnel debug log (enable debug logging with "debug = 7") corresponding to this connection.
Mike
I have put all of it here:
Are you able to reproduce this problem or is it just me?
Arthur Murray wrote:
I have put all of it here:
Are you able to reproduce this problem or is it just me?
I have found the answer!
See this part of the log file: 2011.12.16 09:17:51 LOG7[18821:3086662544]: SSL closed on SSL_read 2011.12.16 09:17:51 LOG7[18821:3086662544]: Sending socket write shutdown
What it means is that connection close was initiated from SSL side of stunnel, and not from the plain socket of stunnel. Your stunnel works in server mode, so SSL side is your s_client.
I found that closing connection on any line starting with an uppercase Q is a feature of s_client. The manual says: CONNECTED COMMANDS If a connection is established with an SSL server then any data received from the server is displayed and any key presses will be sent to the server. When used interactively (which means neither -quiet nor -ign_eof have been given), the session will be renegotiated if the line begins with an R, and if the line begins with a Q or if end of file is reached, the connection will be closed down.
It's funny, isn't it?
Mike