[TAG] 2c tip - debugging POP3 over ssl
Neil Youngman
ny at youngman.org.uk
Mon Nov 28 10:19:52 MSK 2005
I was having problems with a googlemail account that I had set up. As
googlemail requires a login over ssl I was unable to simply telnet to port
110 to try out the low level as protocol I would normally do.
Fortunately a little research revealed that I could use stunnel to create the
SSL connection.
Options I used were -c for client mode, -f to run in the foreground and send
errors to the terminal, -d for the port from which to forward connections and
-r for the remote address to connect to.
I had to run stunnel as root, as it was unable to create a file it required
otherwise. This may not be necessary with all configurations
neil ~ 06:44:39 501 > /usr/sbin/stunnel -c -f -d 2020 -r
pop.googlemail.com:995
2005.11.28 07:14:55 LOG5[6414:3083712896]: Using 'pop.googlemail.com.995' as
tcpwrapper service name
2005.11.28 07:14:55 LOG5[6414:3083712896]: stunnel 3.26 on i486-pc-linux-gnu
PTHREAD+LIBWRAP with OpenSSL 0.9.8a 11 Oct 2005
2005.11.28 07:14:55 LOG3[6414:3083712896]: Cannot create pid
file /var/run/stunnel/stunnel.pop.googlemail.com.995.pid
2005.11.28 07:14:55 LOG3[6414:3083712896]: create: Permission denied (13)
neil ~ 07:14:55 502 >
This is a successful run.
root at tsr2:~# /usr/sbin/stunnel -c -f -d 2020 -r pop.googlemail.com:995
2005.11.28 06:55:04 LOG5[6342:3083712896]: Using 'pop.googlemail.com.995' as
tcpwrapper service name
2005.11.28 06:55:04 LOG5[6342:3083712896]: stunnel 3.26 on i486-pc-linux-gnu
PTHREAD+LIBWRAP with OpenSSL 0.9.8a 11 Oct 2005
2005.11.28 06:55:04 LOG5[6342:3083712896]: FD_SETSIZE=1024, file ulimit=1024
-> 500 clients allowed
2005.11.28 06:55:24 LOG5[6342:3083557808]: pop.googlemail.com.995 connected
from 127.0.0.1:3459
2005.11.28 06:56:24 LOG5[6342:3083557808]: Connection closed: 62 bytes sent to
SSL, 111 bytes sent to socket
2005.11.28 07:06:38 LOG3[6342:3083712896]: Received signal 2; terminating
root at tsr2:~#
And this is my forwarded telnet session.
neil ~ 06:54:47 515 > telnet localhost 2020
Trying 127.0.0.1...
Connected to tsr2.
Escape character is '^]'.
+OK Gpop 12pf7528206nzn ready.
user none.you.know at googlemail.com
+OK send PASS
pass *************
-ERR [AUTH] Username and password not accepted.
quit
+OK Farewell.
Connection closed by foreign host.
neil ~ 06:56:24 516 >
You can see that the password was rejected, although I was able to cut and
paste that password into a web login and log in successfully.
Neil Youngman
More information about the TAG
mailing list