I played around with this with EmailKit: http://colorstudy.com/software/webware/EmailKit-0.1.0.tar.gz
I plan sometime to work with it again, but I haven't done anything with it for quite a while -- it might need a little bit of editing, since raw access to the request has changed. Also it would ideally use the new email module. Someday I would like to make something similar to Debian's bug tracking system, where an intermediary (Webware) intercepts and records email related to particular tasks -- that was my initial goal with making EmailKit. The adapter works as a standalone program that forwards to Webware and is installed like you describe with ASK.py. For higher volume wkcgi could be adapted fairly easily, since such an adapter would be very similar to CGI. An SMTP server as with Twisted seems excessive -- real environments are heterogeneous. Ideally an email should produce something different from HTTPRequest. I would propose that the adapter interface should be extended to use the "format" key, using "email" or "rfc822" (?) or something -- it's currently always set to "CGI". From there an EmailRequest could be made. Which servlet would probably be controlled by a command-line parameter to the adapter, so you'd get something like: #.forward: |/usr/local/Webware/WebKit/Adapters/EmailAdapter.py /EmailServlet And perhaps EmailAdapter.py would take other (arbitrary) options that would be passed on to the handler. On Tue, 2003-01-14 at 10:11, Aaron Held wrote: > Does anyone have any thoughts about a Mailhandler API? > > I recently needed to process some email and I took a look at Twisted > Python and the James Mailserver (Java). They have some interesting > ideas, but I am more comfortable w/ the Webware way of things. > > Where as Twisted tried to be the complete Protocol handler, Webware > wants to be an app server that relies on Native adapters to handle the > messy protocol details. > > James has excellent mail servlet structure that mimics the servlet > architecture very well. You have a maillet that you can extent in much > the same way you can extend a servlet. > > Currently I have a number of email robots that simply exist as pipe > forwards in an alias or .forward file. > > My personal email has a forward file like: > > /home/aaron/.forward > > #forward to ASK spam filter > |/usr/local/bin/ASK.py > > which takes my email and sends to a script called ASK > > My first thought was to write a script using that takes the email and > makes an XML-RCP call to webware, but that requires a lot of translation > layers. A better idea would to to write an adapter that speaks to > webware directly. Then you could write a 'pyMaillet' to handle that email. > > The adapter should also pass SERVER type variables that make sense to > email. > > Anyway, since the email server in question is current MS Exchange, I > wound up writing a python script that pulls the email directly from the > server via IMAP. It will run as a taks under webkit, but that is not a > clean a solution as something that runs when the email arrives. > > If anyone has any thoughts on this topic I would appreciate it. This is > an untapped market for webware and I would not mind creating a proof of > concept if other people see a need for it. > > -Aaron > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Webware-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/webware-devel -- Ian Bicking <[EMAIL PROTECTED]> ------------------------------------------------------- This SF.NET email is sponsored by: Take your first step towards giving your online business a competitive advantage. Test-drive a Thawte SSL certificate - our easy online guide will show you how. Click here to get started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en _______________________________________________ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel