Hello fellow Mailman developers,
My name is William Mead, I'm a new Mailman developer and currently as an intern for Ian Elioart at the university of Sussex.
We have started working on Mailman 3.0. At the moment we are looking at the lmtp part of Mailman, however we have come up against a few problems. We are able to get all the queue runners started except for the lmtp queue runner. We have set lmtp to be used in the Defaults.py file, but this doesn't start the lmtp queue runner.
We are currently looking at the lmtp.txt file in 3.0/Mailman/queue/docs. To start a lmtp queue runner we need to be able to run these 3 lines of code :
from mailman.tests import helper master = helpers.TestableMaster() master.start('lmtp')
However the second line of code gives us an error and prevents us from starting the lmtp runner.
The python code contained in this file produces errors when trying to doctest it. Once we've run the doctest :
import doctest doctest.testfile("lmtp.txt")
here is the first error :
File "./lmtp.txt", line 14, in lmtp.txt Failed example: master = helpers.TestableMaster() Exception raised: Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/doctest.py", line 1212, in __run File "<doctest lmtp.txt[1]>", line 1, in <module> master = helpers.TestableMaster() File "/Library/Python/2.5/site-packages/mailman-3.0.0a1_-py2.5.egg/mailman/tests/helpers.py", line 114, in __init__ restartable=False, config_file=config.filename) AttributeError: 'Configuration' object has no attribute 'filename'
which correctly corresponds to the second line of code needed, we saw earlier.
Do we have to import any other files or set any specific variables ?
William Mead.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Jul 3, 2008, at 7:59 AM, William Mead wrote:
Hello fellow Mailman developers,
My name is William Mead, I'm a new Mailman developer and currently as an intern for Ian Elioart at the university of Sussex.
We have started working on Mailman 3.0. At the moment we are looking at the lmtp part of Mailman, however we have come up against a few problems. We are able to get all the queue runners started except for the lmtp queue runner. We have set lmtp to be used in the Defaults.py file, but this doesn't start the lmtp queue runner.
We are currently looking at the lmtp.txt file in 3.0/Mailman/queue/docs. To start a lmtp queue runner we need to be able to run these 3 lines of code :
from mailman.tests import helper master = helpers.TestableMaster() master.start('lmtp')
However the second line of code gives us an error and prevents us from starting the lmtp runner.
The python code contained in this file produces errors when trying to doctest it. Once we've run the doctest :
import doctest doctest.testfile("lmtp.txt")
here is the first error :
File "./lmtp.txt", line 14, in lmtp.txt Failed example: master = helpers.TestableMaster() Exception raised: Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.5/ lib/python2.5/doctest.py", line 1212, in __run File "<doctest lmtp.txt[1]>", line 1, in <module> master = helpers.TestableMaster() File "/Library/Python/2.5/site-packages/mailman-3.0.0a1_- py2.5.egg/mailman/tests/helpers.py", line 114, in __init__ restartable=False, config_file=config.filename) AttributeError: 'Configuration' object has no attribute 'filename'
which correctly corresponds to the second line of code needed, we
saw earlier.Do we have to import any other files or set any specific variables ?
Hi William.
First, I just want to be sure you're running the test suite the way
it's (currently) intended. Here's what I do in a pristine branch:
% mkdir staging
% pushd staging
% export PYTHONPATH=pwd
:$PYTHONPATH
% popd
% python setup.py develop -d staging
% staging/bin/testall lmtp
You might want to run testall with -v and/or -e. The former produces
a bit more verbosity, such as the config file its loading. The latter
propagates any exceptions in the child process to the console.
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin)
iEYEARECAAYFAkhs87MACgkQ2YZpQepbvXHprQCfXMV5OuFF8dGtUNlSxQtfI33Y LhoAoJVaI0fa4ZY6jNB47g09QEfzocCH =eK9s -----END PGP SIGNATURE-----
--On 3 July 2008 12:59:59 +0100 William Mead <william.multimedia@gmail.com> wrote:
My name is William Mead, I'm a new Mailman developer and currently as an intern for Ian Eiloart at the university of Sussex.
We're up and running now, and working on the LMTP qrunner, which is based on a subclass ("Channel") of the class smtpd.SMTPChannel - part of Python's Library.
We're having to use name mangling to access some private attributes of smtpd.SMTPChannel. It seems that virtually everything in SMTPChannel is private, making it quite hard to override any of its methods.
It seems to me natural that an smtp/lmtp daemon will wish to access all the information available to it from its s/lmtp session at any time, and therefore the arguments to all the session commands should be available at any time - up to an RSET.
For example, you really should not reject an email before RCPT TO:, in case it's addressed to "postmaster" at a local domain. Exceptions might be made for really hopeless syntactical errors, though.
So, I think these attributes should be public - so that we have easy access to them at RCTP TO: and at DATA.
argument to EHLO/HELO argument to MAIL FROM number or rejected recipients
-- Ian Eiloart IT Services, University of Sussex x3148
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Jul 7, 2008, at 11:13 AM, Ian Eiloart wrote:
We're having to use name mangling to access some private attributes
of smtpd.SMTPChannel. It seems that virtually everything in
SMTPChannel is private, making it quite hard to override any of its
methods.
Yep, this sucks. The code was written back when we thought this was a
good idea. Fixing it requires changes in Python, and it's probably
too late to get this into Python 2.6 and 3.0.
The best thing I can suggest is to make them public in the LMTP
subclass, probably using properties that do the name mangling.
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin)
iEYEARECAAYFAkhyNgMACgkQ2YZpQepbvXGlzQCgpxBZQrYtbxKs74yWyT0Nx489 o1YAoLW6AwXlcLXy6mqy4xutX3hekeIC =9b1/ -----END PGP SIGNATURE-----
participants (3)
-
Barry Warsaw
-
Ian Eiloart
-
William Mead