是否有一个工具包可以为远程 IMAP 服务器提供基于 Web 的 API(xmlrpc、REST 等)?
我正在开发一个需要访问 IMAP 的 Google App Engine 项目。 Context.IO 对于我的目的来说还不够强大,但我想要一些本着同样精神的东西:我想使用第三方登录、访问和操作 Google App Engine 中的数百个 IMAP 邮箱服务或应用程序服务器我放在专用托管服务器上。
正如您可能想象的那样,这主要是为了解决 GAE 中打开套接字的限制。
有什么建议吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道有任何预先制定的解决方案,但推出自己的解决方案应该不会很困难或花费太长时间。您可以在 IMAPClient 和 SimpleXMLRPCServer 在服务器上并使用 xmlrpclib 在客户端上。
不过,您需要考虑一种在调用之间保留状态的方法,因为 XmlRPC 是一种无连接协议(大多数其他 RPC 机制也是如此)并实现某种形式的服务身份验证。我编写了一个继承自
SimpleXMLRPCServer
的类,它支持 SSL 连接和 HTTP Basic Auth(xmlrpclib
已经支持这两项)。如果您对代码感兴趣,请给我留言。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.看看 Mailgun;它提供强大的 API 并支持 IMAP V4。*
* IMAP 邮箱位于 Mailgun
Have a look at Mailgun; it offers a robust API and supports IMAP V4.*
* IMAP mailboxes are on Mailgun