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,
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()
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()