I'm writing a Perl script to connect to an IMAP server that requires TLS over port 143. The server does not support connecting over SSL. Thus far, the Perl IMAP modules I have found support only SSL, not TLS.
Are there any Perl IMAP modules that provide TLS support? Thus far I have looked at:
Net::IMAP Net::IMAP::Simple Net::IMAP::Client
Net::IMAP::Client supports SSL but not TLS.
Any thoughts?
-
You make a non-ssl socket that is later transformed, "This is also useful if you want to use IO::Socket::INET alternatives, like IO::Socket::SSL."
http://search.cpan.org/dist/Mail-IMAPClient/lib/Mail/IMAPClient.pod#Socket
... when you create your method reference here ...
http://search.cpan.org/~sullr/IO-Socket-SSL-1.24/SSL.pm#METHODS
the example here can be easily tuned
http://cpansearch.perl.org/src/SULLR/IO-Socket-SSL-1.24/example/ssl_client.pl
Peter Wood : I'm afraid I don't understand enough about this to code what needs to be coded. I'm really looking for a module that provides this functionality built-in. In other words, I'd like to simply initiate an IMAP connection and specify "TLS => 1". On the other hand, I'd also be happy if you were to lay out in a bit more detail exactly how I could get to having an IMAP module with TLS support, using the above methods.hpavc : Make your network connection with io::socket and then hand that connection off to mail::imapclient. It will not try and make its own connection, but rather use the one use made for it. This allows you to use whatever mechanism you can muster. This is a good thing since we really don't want the mail::imapclient programers reinventing the wheel and dealing with networking.
0 comments:
Post a Comment