-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Tokio,
I took a look at LMTPRunner.py today, and it looked pretty good. I
don't think it was quite RFC 2033 compliant though. One thing it
needed to do was return a status code for every RCPT TO recipient.
Take a look at r8050. I've fixed the status codes and also done a
bunch of other refactoring. Note that I haven't yet tried to hook
this up to a real Postfix (or other LMTP client), but it seems to do
the right thing when you telnet to localhost:8025. Give it a try and
let me know what you think. I plan on testing Postfix integration,
perhaps tomorrow.
This definitely shows a lot of promise. I will probably hold off on
updating the MaildirRunner for now, to see how far we can take LMTP
delivery, and whether an smtpd.py-based server can hold up. Great work!
Cheers,
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRSSKnXEjvBPtnXfVAQLrUwQAg3BXbEROLAxwQ2CV64bxzQe8tR2X/K7z fdkHK5lepztbKxbYI+RkMzxeYgD8+q78ha8NIQxzmLHW6frcgOmUFyHye9ZT+EiS +/63Joj8bu5GEC0v8F7MsR1J2RqJ67MnwFU/ezge8TNRceeH2y4SuOAcX276oSIq pFpIW0TQO9M= =51Ir -----END PGP SIGNATURE-----
Hi Barry,
I took a look at LMTPRunner.py today, and it looked pretty good. I
don't think it was quite RFC 2033 compliant though. One thing it
needed to do was return a status code for every RCPT TO recipient.
I've looked over that part. ;-)
Take a look at r8050. I've fixed the status codes and also done a
bunch of other refactoring. Note that I haven't yet tried to hook
this up to a real Postfix (or other LMTP client), but it seems to do
the right thing when you telnet to localhost:8025. Give it a try and
let me know what you think. I plan on testing Postfix integration,
perhaps tomorrow.
It's working just fine on my test environment.
This definitely shows a lot of promise. I will probably hold off on
updating the MaildirRunner for now, to see how far we can take LMTP
delivery, and whether an smtpd.py-based server can hold up. Great work!
Now wonder if we can put a MailmanHTTPRunner(Server) in mailman-2.2. This should completely get rid of the setgid problem in the installation.
I've tested putting this script in /usr/local/mailman (<prefix>) directory and get my browser pointing to http://server:8000/Mailman/Cgi/listinfo.py. Unfortunately, the BaseHTTPServer in the Python distribution is based on syncronous TCPServer, thus it cannot handle simultaneous connections. There are threading and forking TCPServers in the SocketServer module and we may be able to use them to compose a customized Mailman HTTP Server.
import paths # Put paths.py in /usr/local/mailman directory import BaseHTTPServer import CGIHTTPServer
from Mailman.configuration import config config.load()
class MailmanHTTPRequestHandler(CGIHTTPServer.CGIHTTPRequestHandler):
have_fork = 0
have_popen2 = 0
have_popen3 = 0
cgi_directories = ['/Mailman/Cgi']
def test(HandlerClass=MailmanHTTPRequestHandler, ServerClass=BaseHTTPServer.HTTPServer): CGIHTTPServer.test(HandlerClass, ServerClass)
if __name__ == '__main__': test()
-- Tokio Kikuchi, tkikuchi@is.kochi-u.ac.jp http://weather.is.kochi-u.ac.jp/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Oct 5, 2006, at 9:33 PM, Tokio Kikuchi wrote:
Take a look at r8050. I've fixed the status codes and also done a bunch of other refactoring. Note that I haven't yet tried to hook this up to a real Postfix (or other LMTP client), but it seems to do the right thing when you telnet to localhost:8025. Give it a try and let me know what you think. I plan on testing Postfix integration, perhaps tomorrow.
It's working just fine on my test environment.
Excellent, thanks!
Now wonder if we can put a MailmanHTTPRunner(Server) in mailman-2.2. This should completely get rid of the setgid problem in the
installation.
Actually, something that emf mentioned a while ago: we should adapt
the current web interface to WSGI and then perhaps use
wsgiref.simple_server():
http://www.python.org/doc/current/lib/module-wsgiref.simpleserver.html
Of course, this comes with Python 2.5, but I believe is available as
a distutils package for Python 2.4. The advantage is not only that
we can do away with the setgid stuff, but that our web interface
(even if nothing else is rewritten) can be dropped into any WSGI
compliant framework. In theory. I haven't actually tried any of
that yet, but currently that's the directly I'm thinking 2.2 should
move to.
(But yes, that does probably mean we could include a
wsgiref.simple_server()-based runner of sorts, although that's going
to be a bit of a misnomer :)
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRSZPwHEjvBPtnXfVAQKbawQAuVCAFWFGxR6lrSLaIhjWToTvEQrxbuny V5CIMbKj+1TDKeuQUbpzVjkVZ0KAjgH1cPBq6CuQfQVui3FUm924LxfJyqi9Yd3v hNvtWDf8+1lPbXEsf1xH5iCQQIDLu9+1rCNUw8oMcndo5Ibxo5P6L2NCyATNfjXn YxObfiq+gP0= =Wfuw -----END PGP SIGNATURE-----
Barry Warsaw wrote:
Actually, something that emf mentioned a while ago: we should adapt
the current web interface to WSGI and then perhaps use
wsgiref.simple_server():http://www.python.org/doc/current/lib/module-wsgiref.simpleserver.html
Hi,
I've checked in HTTPRunner.py using this simple server and wsgi_app.py for wrapping mailman cgi in wsgi environment. I fear I may be doing wrong things but it should be a proof that right things can be done.
There are some glitches in admin authentication interfaces: e.g., if I want to enter password in http://server/mailman/admin/listname, then I'm redirected to http://server/admin/admin/listname. Authentication at http://server/mailman/admin/listname/general works but the redirected URL becomes http://server/mailman/admin/listname/admin/listname/general.
Of course, this comes with Python 2.5, but I believe is available as
a distutils package for Python 2.4. The advantage is not only that
we can do away with the setgid stuff, but that our web interface
(even if nothing else is rewritten) can be dropped into any WSGI
compliant framework. In theory. I haven't actually tried any of
that yet, but currently that's the directly I'm thinking 2.2 should
move to.(But yes, that does probably mean we could include a
wsgiref.simple_server()-based runner of sorts, although that's going
to be a bit of a misnomer :)
- -Barry
Cheers,
-- Tokio Kikuchi, tkikuchi@is.kochi-u.ac.jp http://weather.is.kochi-u.ac.jp/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Oct 8, 2006, at 10:19 PM, Tokio Kikuchi wrote:
I've checked in HTTPRunner.py using this simple server and
wsgi_app.py for wrapping mailman cgi in wsgi environment. I fear I
may be doing wrong things but it should be a proof that right
things can be done.There are some glitches in admin authentication interfaces: e.g.,
if I want to enter password in http://server/mailman/admin/ listname, then I'm redirected to http://server/admin/admin/ listname. Authentication at http://server/mailman/admin/listname/ general works but the redirected URL becomes http://server/mailman/ admin/listname/admin/listname/general.
I checked in a bunch of updates to the web interface that should make
things run better under wsgi. It's still not perfect, but most of
the links (which are now relative) should work. I haven't tried it
under traditional cgi yet (just wsgiref) so I may have broken things
there.
If you give it a try, let me know how it goes!
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRTODsHEjvBPtnXfVAQIu7QP9GGCNz4jk9eojS5ZTwfVlNAtq4i5vS+Rk NuPojlND9ZfhqIBP0kM7sRFmIh8iVEf0R5Rp+wYMMKANi43IDeks29uZYZoA5V5L Y4AJJTloqWO8fbXL90EsrFEZ6NG96s+r/F2oM3movRoGCtLuugrwOhPsLqRpK4MM /Z6Q4LLSsAU= =ROAT -----END PGP SIGNATURE-----
Hi,
I checked in a bunch of updates to the web interface that should make things run better under wsgi. It's still not perfect, but most of the links (which are now relative) should work. I haven't tried it under traditional cgi yet (just wsgiref) so I may have broken things there.
If you give it a try, let me know how it goes!
Thank you for the hard work, but now I have to enter admin password every time I click on the admin categories. I use apache ProxyPass under http://server/mailman/admin and the cookie specifies its path as /admin which is different from the current path as viewed from the browser through the reverse proxy. :-(
-- Tokio Kikuchi, tkikuchi@is.kochi-u.ac.jp http://weather.is.kochi-u.ac.jp/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Oct 16, 2006, at 9:25 AM, Tokio Kikuchi wrote:
I checked in a bunch of updates to the web interface that should
make things run better under wsgi. It's still not perfect, but
most of the links (which are now relative) should work. I haven't
tried it under traditional cgi yet (just wsgiref) so I may have
broken things there. If you give it a try, let me know how it goes!Thank you for the hard work, but now I have to enter admin password
every time I click on the admin categories. I use apache ProxyPass
under http://server/mailman/admin and the cookie specifies its path
as /admin which is different from the current path as viewed from
the browser through the reverse proxy. :-(
Ah darn. I struggled quite a bit with the cookie path and got it to
work through wsgiref. I had some problems making that work with the
CGI environment variables, but I guess I'll have to try again. :/
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRTOidHEjvBPtnXfVAQLS0AP/Xqf02Gsc/VdtxGOxcy7l7U0e1xCELueh a1uoEU+fP5Xz/COm3x7V72EmyPvwC+A+H+O5VtXu46SdNG5MSd36BBhrSClkf+3Z WJ6ESyf56GwfihaO1t+3ZmNQnoaqbxCQwYifeZwKbihDZFxx99qCfT42lIUxoZEC wff+Z6ZIAgc= =jfMH -----END PGP SIGNATURE-----
participants (2)
-
Barry Warsaw
-
Tokio Kikuchi