POP3 and SMTP with SSL support

Hello ruby-talk,

recently, I wanted to use ruby to connect to my gmail accout. Gmail
supports POP3S and SMTP with TLS authentication.

Ruby’s stdlib don’t support OpenSSL for those protocols.

It was pretty easy to add SSL support to POP3. There was a working
version for ruby 1.6 found on this ML, and I just had to adapt it. I
have joined a working example to this email for interested people. It
doesn’t support specified certificates, so it’s pretty useless for
real security.

All happy, I thought that it would be that easy for SMTP. My bad. SMTP
doesn’t work the same way. Here’s the RFC :
http://www.ietf.org/rfc/rfc2487.txt

What I want, is start a thread on this subject here. It looks like
ruby’s support to those protocols is not complete. Is it worth
starting a new project on rubyforge ? Would those changes be
integrated in the stdlib ? I’m ready to get a bit involved here, but I
would need some help from other people too.


Cheers,
zimba

zimba-tm wrote:

All happy, I thought that it would be that easy for SMTP. My bad. SMTP
doesn’t work the same way. Here’s the RFC :
http://www.ietf.org/rfc/rfc2487.txt

What I want, is start a thread on this subject here. It looks like
ruby’s support to those protocols is not complete.

TLS isn’t part of the SMTP protocol, it’s an extension to it. So the
fact that Ruby doesn’t support TLS doesn’t mean its support for SMTP is
not complete.

I’d be inclined to implement a separate TLS library, perhaps based on
the existing Ruby SSL, and then patch the SMTP library to call it. Then
for extra points, you could make the LDAP and POP3 standard libraries
able to call the TLS library too.

mathew