views:

101

answers:

1

I am running a site where users can private message each other. As with any other such website, to read and mark their messages, users must log on to the site.

I wish to expose an IMAP interface so that users may read their site messages using their standard email client. There would be few complications in such approach as what be userid to email-address mapping and what would happen if the user replies a mail but for the time being I'm little concerned about these issues.

Is there any lightweight raw IMAP server in Python to which I could just add few rules or logic to expose an IMAP interface to user's messages?

+1  A: 

Twisted Mail project:

Twisted Mail contains high-level, efficient protocol implementations for both clients and servers of SMTP, POP3, and IMAP4. Additionally, it contains an "out of the box" combination SMTP/POP3 virtual-hosting mail server. Also included is a read/write Maildir implementation and a basic Mail Exchange calculator (depends on Twisted Names).

The examples for IMAP4 contain only a client. Look into the source for more information.

gimel