[Zope-dev] Creating IMAP and SMTP services for Zope

ender kthangavelu@earthlink.net
Sat, 3 Feb 2001 16:41:48 -0800


On Saturday 03 February 2001 10:28, Morten W. Petersen wrote:
> Hi guys,
>
> I'm wondering about creating IMAP and SMTP services for Zope.
> Someone mentioned to me that extending (using?) the ZServer
> could be a Good Thing (tm).

probably. i've always been curious though about the threads in zserver, i 
thought they were allocated to handle only zpublisher requests (maybe just 
http requests). assuming you don't want to tie up the thread handling the 
asyncore it seems you might need to create a pool of threads for handling 
requests, or adjust your code to translate imap/smtp requests into zpublisher 
requests so the default pool can be used. granted if you're not also running 
a  busy website on this than it probably won't be a concern as esp. if the 
server operations are fast.

> Could anyone point me in the right direction?

micheal already pointed out his imap code. i'd like to give warning that 
handling imap properly with different clients can be a pain. the protocol is 
a bit complex and there are some gray areas, which different clients handle 
differently. pop is much, much simpler if you want to go that route (with the 
option of just leaving mail on the server, you might be able to treat it 
superficially  like imap).

barry warsaw has an async implementation of a smtp server that he uses to 
test out mailman, its on his homesite at

http://www.wooz.org/users/barry/software/Code/smtpd.py

HTH,

kapil