Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a toolkit that will provide a web-based API (xmlrpc, REST, whatever) to remote IMAP servers?

I'm working on a Google App Engine project that needs to access IMAP. Context.IO isn't quite powerful enough for my purposes, but I'd like something in the same spirit: I want to log into, access, and manipulate hundreds of IMAP mailboxes from within Google App Engine, using either a third-party service or an application server I put on a dedicated hosting server.

As you might imagine, this is mostly to work around the opening sockets limitation in GAE.

Any recommendations?

like image 288
Ken Kinder Avatar asked Oct 19 '11 20:10

Ken Kinder


1 Answers

I don't know of any pre-made solution, but rolling your own shouldn't be very difficult or take too long. You can build on IMAPClient and SimpleXMLRPCServer on the server and use xmlrpclib on the client.

You would need to think about a way to retain state between calls though, since XmlRPC is a connectionless protocol (as most other RPC mechanisms are as well) and implement some form of service authentication. I have written a class inherited from SimpleXMLRPCServer, which supports SSL connections and HTTP Basic Auth (xmlrpclib already has support for both items). If you're interested in the code, give me a shout.

like image 155
Chris Arndt Avatar answered Oct 02 '22 01:10

Chris Arndt