Link to Home Page
Paw Prints

For the love of all that's good and right in this world, update your browser! Firefox 3 Apple Safari Opera Internet Explorer Google Chrome

Your browser version is an abomination of security holes and bugs. To enjoy this sight fully, upgrade to a modern browser and witness the web in all its glory.

Trying RTM From Launchy

Sep, 2008 (2008-09-07 16:18)

RTM is a very slick todo list app that has extremely nice hotkeys and simple interface. Using launchy, it’s possible to connect to RTM to Launchy and create new tasks from your desktop. However, I wasn’t able to get this working, despite the excellent guide.

I spent several hours trying, but I just can’t seem to get stunnel to play with gmail. Externally, it just sort of hangs up for a while.

Running blat direclty produces this:

C:\Program Files\stunnel>blat - -subject "test" -body "test" -to username@gmail.com -u username -pw xxxxx -f username@gmail.com -server 127.0.0.1:1099
Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19
Error: Wait a bit (possible timeout).
SMTP server error
Error: Not a socket.
Error: Not a socket.

A deeper look into stunnel, using the log suggests these errors:

2008.09.06 22:11:08 LOG5[1216:3484]: SMTP Gmail accepted connection from 127.0.0.1:2457
2008.09.06 22:11:08 LOG7[1216:3484]: SSL state (accept): before/accept initialization
2008.09.06 22:11:39 LOG3[1216:3484]: SSL_accept: Peer suddenly disconnected
2008.09.06 22:11:39 LOG5[1216:3484]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
2008.09.06 22:11:39 LOG7[1216:3484]: SMTP Gmail finished (0 left)

I tried running blat directly to gmail (instead of through stunnel) and found that it doesn’t work at all on port 465—connection times out. But 587 does produce some output:

C:\Program Files\stunnel>blat - -debug -subject "test" -body "test" -to username@gmail.com -u username -pw xxxxx -f username@gmail.com -server smtp.gmail.com:587
Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
 
<<<<< 220 mx.google.com ESMTP k2sm6279135rvb.1
>>>putline>>> EHLO WFS-MRICHARDSON.gmail.com
<<<<< 250-mx.google.com at your service, [75.141.207.70]
<<<<< 250-SIZE 35651584
<<<<< 250-8BITMIME
<<<<< 250-STARTTLS
<<<<< 250 ENHANCEDSTATUSCODES
Sending stdin.txt to username@zentrack.net
Subject: test
Login name is username@gmail.com
>>>putline>>> AUTH LOGIN
<<<<< 530 5.7.0 Must issue a STARTTLS command first. k2sm6279135rvb.1
The SMTP server does not require AUTH LOGIN.
Are you sure server supports AUTH?
>>>putline>>> MAIL FROM:
<<<<< 530 5.7.0 Must issue a STARTTLS command first. k2sm6279135rvb.1
The SMTP server does not like the sender name.
Have you set your mail address correctly?
>>>putline>>> QUIT
<<<<< 221 2.0.0 mx.google.com closing connection k2sm6279135rvb.1

This is exactly what would be expected, since gmail requires SSL (STARTTLS) and it won’t allow the AUTH until SSL is initiated.

After a couple hours of sniffing tcp packets and fiddling and googling, I think the problem is stunnel sending an RST command, which google hangs up on.

Here’s the output from my stunnel.conf for fun:

; Sample stunnel configuration file by Michal Trojnara 2002-2006
; Some options used here may not be adequate for your particular configuration
 
; Certificate/key is needed in server mode and optional in client mode
; The default certificate is provided only for testing and should not
; be used in a production environment
cert = stunnel.pem
;key = stunnel.pem
 
; Some performance tunings
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
 
; Workaround for Eudora bug
;options = DONT_INSERT_EMPTY_FRAGMENTS
 
; Authentication stuff
;verify = 2
; Don't forget to c_rehash CApath
;CApath = certs
; It's often easier to use CAfile
;CAfile = certs.pem
; Don't forget to c_rehash CRLpath
;CRLpath = crls
; Alternatively you can use CRLfile
;CRLfile = crls.pem
 
; Some debugging stuff useful for troubleshooting
debug = 7
output = stunnel.log
 
; Use it for client mode
 
;client = yes
 
; Service-level configuration
[SMTP Gmail]
accept = 127.0.0.1:1099
connect = smtp.gmail.com:587
 
[POP3 Gmail]
accept = 127.0.0.1:1109
connect = pop.gmail.com:995
 
;[pop3s]
;accept  = 995
;connect = 11 0
 
;[imaps]
;accept  = 993
;connect = 143
 
;[ssmtp]
;accept  = 465
;connect = 25
 
;[https]
;accept  = 443
;connect = 80
;TIMEOUTclose = 0
 
; vim:ft=dosini
;vim:ft=dosini

Note that I’ve tried this on 465 and 587… 587 being the only one that gave output directly through blat : (

I really wanted to do this, but I’ve been forced back to using RTM via Twitter/Launchy Combo instead, which is not what I wanted, but is functional. For those of you interested in reading about how to set up twitter/rtm/launchy, there is an excellent guide on taking Launchy beyond application launching which includes this spiffy feature.

Here’s what the stunnel.log referenced in the config looks like after an attempt. Note the “connection suddenly reset, which matches up with the RST command I see in Wireshark(formerly Etheral packet sniffer)

2008.09.07 15:48:37 LOG7[1216:2508]: SMTP Gmail accepted FD=256 from 127.0.0.1:4181
2008.09.07 15:48:37 LOG7[1216:2508]: Creating a new thread
2008.09.07 15:48:37 LOG7[1216:2508]: New thread created
2008.09.07 15:48:37 LOG7[1216:4292]: SMTP Gmail started
2008.09.07 15:48:37 LOG7[1216:4292]: FD 256 in non-blocking mode
2008.09.07 15:48:37 LOG7[1216:4292]: TCP_NODELAY option set on local socket
2008.09.07 15:48:37 LOG5[1216:4292]: SMTP Gmail accepted connection from 127.0.0.1:4181
2008.09.07 15:48:37 LOG7[1216:4292]: SSL state (accept): before/accept initialization
2008.09.07 15:53:37 LOG6[1216:4292]: init_ssl: s_poll_wait timeout
2008.09.07 15:53:37 LOG5[1216:4292]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
2008.09.07 15:53:37 LOG7[1216:4292]: SMTP Gmail finished (0 left)

5 Responses to 'Trying RTM From Launchy'

Subscribe to comments with RSS or TrackBack to 'Trying RTM From Launchy'.

  1. TrevorNo Gravatar

    18 Dec 08 at 5:28 am

    Thanks very much for the post. At least you saved me from going any further with the same problem!

  2. Taylor MonacelliNo Gravatar

    18 Dec 08 at 9:45 pm

    I so appreciate seeing the logs of your efforts. Your failed attempts are still extremely helpful. I have spent the last two days trying to get this to work too. I can’t let it go since Outlook can sync properly, i can’t give up on blat or sendmail. Thanks for documenting your efforts so clearly

  3. wulfNo Gravatar

    19 Dec 08 at 8:34 am

    @Trevor – It works pretty well through the twitter approach linked at the end if you want an alternative.

    @Taylor – My pleasure, let me know if you figure it out.

  4. TrevorNo Gravatar

    19 Dec 08 at 8:40 am

    Isn’t it funny how you can get no comments for three months, and then get two in one day!

  5. GuntherNo Gravatar

    25 Mar 09 at 2:37 pm

    Try Uncommenting the “client = yes” line.
    Delete the “;” from there.

    ;-)

Leave a Reply

This site is using OpenAvatar based on