
I'm trying to send email to a mailman list from an address that isn't subscribed to the list, The expected behaviour (or the configured at least) would be for this message to be held for moderation, however it's not, and I'm getting the following error. Versions: Python 2.5.1, Mailman is 2.1.9.
List members can post to the list fine.
Jul 10 17:11:58 2007 (28644) Uncaught runner exception: unbound method reason_notice() must be called with ImplicitDestination instance as first argument (got nothing instead)
Jul 10 17:11:58 2007 (28644) Traceback (most recent call last):
File "/opt/mailman/Mailman/Queue/Runner.py", line 105, in _oneloop
self._onefile(msg, msgdata)
File "/opt/mailman/Mailman/Queue/Runner.py", line 155, in _onefile
keepqueued = self._dispose(mlist, msg, msgdata)
File "/opt/mailman/Mailman/Queue/IncomingRunner.py", line 129, in _dispose
status = self._dopipeline(mlist, msg, msgdata, pipeline)
File "/opt/mailman/Mailman/Queue/IncomingRunner.py", line 152, in _dopipeline
sys.modules[modname].process(mlist, msg, msgdata)
File "/opt/mailman/Mailman/Handlers/Hold.py", line 162, in process
hold_for_approval(mlist, msg, msgdata, ImplicitDestination)
File "/opt/mailman/Mailman/Handlers/Hold.py", line 205, in hold_for_approval
reason = Utils.wrap(exc.reason_notice())
TypeError: unbound method reason_notice() must be called with ImplicitDestination instance as first argument (got nothing instead)
Jul 10 17:11:58 2007 (28644) SHUNTING: 1184083917.788264+31f0e344a0c344044943f7eb4b0669288a21e319
Cheers
Simon

On 7/10/07, Simon Helson wrote:
IIRC, Python 2.5.x is too new for Mailman 2.1.9. Try going back to the most recent version of Python 2.4.x, and see what happens.
-- Brad Knowles <brad@shub-internet.org>, Consultant & Author LinkedIn Profile: <http://tinyurl.com/y8kpxu> Slides from Invited Talks: <http://tinyurl.com/tj6q4>
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

Brad Knowles wrote:
Just as a datapoint, I helped someone on the Fedora list setup mailman 2.1.9 recently. Fedora 7 uses python 2.5 and AFAICT, doesn't add any patches to mailman for python 2.5 compatibility. In some quick testing, I've not run into any issues (not to say that there aren't plenty of them lurking).
I just sent a message to a list where generic_nonmember_action is set to hold and there wasn't any traceback or other error. Perhaps there's something else at play? I wouldn't think the difference between python 2.5 and 2.5.1 would be enough to cause this (though I'm far from certain of that).
-- Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
For a list of all the ways technology has failed to improve the
quality of life, please press three.
-- Alice Kahn, writer

Simon Helson wrote:
Brad Knowles wrote:
IIRC, Python 2.5.x is too new for Mailman 2.1.9. Try going back to the most recent version of Python 2.4.x, and see what happens.
That may help, but if it does, I don't think its an incompatibility between Python 2.5.1 and *our* 2.1.9. I *think* our 2.1.9 is compatible with Python 2.5.1. I'm currently using Python 2.5.1 for development/testing on the 2.1 branch.
There is definitely something wrong in the hold_for_approval function in /opt/mailman/Mailman/Handlers/Hold.py, but I am unable to say what since your version of this module is either patched by your site or whoever prepared your 2.1.9 package. The line number of
reason = Utils.wrap(exc.reason_notice())
in the traceback does not correlate with the 2.1.9 distribution.
Is there somewhere we can see the actual contents of the /opt/mailman/Mailman/Handlers/Hold.py module that's on your system?
Does your Hold.py have the following near the beginning of hold_for_approval?
# XXX We use the weird type(type) construct below because in Python
2.1, # type is a function not a type and so can't be used as the second # argument in isinstance(). However, in Python 2.5, exceptions are # new-style classes and so are not of ClassType. if isinstance(exc, ClassType) or isinstance(exc, type(type)): # Go ahead and instantiate it now. exc = exc()
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Simon Helson wrote:
hold_for_approval(mlist, msg, msgdata, ImplicitDestination)
Note that in this specific case, we are attempting to hold the message for "implicit destination". Unless the pipeline has been rearranged, a post from a non-member should have been held in the "Moderate" handler before ever getting this far.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 7/10/07, Simon Helson wrote:
IIRC, Python 2.5.x is too new for Mailman 2.1.9. Try going back to the most recent version of Python 2.4.x, and see what happens.
-- Brad Knowles <brad@shub-internet.org>, Consultant & Author LinkedIn Profile: <http://tinyurl.com/y8kpxu> Slides from Invited Talks: <http://tinyurl.com/tj6q4>
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

Brad Knowles wrote:
Just as a datapoint, I helped someone on the Fedora list setup mailman 2.1.9 recently. Fedora 7 uses python 2.5 and AFAICT, doesn't add any patches to mailman for python 2.5 compatibility. In some quick testing, I've not run into any issues (not to say that there aren't plenty of them lurking).
I just sent a message to a list where generic_nonmember_action is set to hold and there wasn't any traceback or other error. Perhaps there's something else at play? I wouldn't think the difference between python 2.5 and 2.5.1 would be enough to cause this (though I'm far from certain of that).
-- Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
For a list of all the ways technology has failed to improve the
quality of life, please press three.
-- Alice Kahn, writer

Simon Helson wrote:
Brad Knowles wrote:
IIRC, Python 2.5.x is too new for Mailman 2.1.9. Try going back to the most recent version of Python 2.4.x, and see what happens.
That may help, but if it does, I don't think its an incompatibility between Python 2.5.1 and *our* 2.1.9. I *think* our 2.1.9 is compatible with Python 2.5.1. I'm currently using Python 2.5.1 for development/testing on the 2.1 branch.
There is definitely something wrong in the hold_for_approval function in /opt/mailman/Mailman/Handlers/Hold.py, but I am unable to say what since your version of this module is either patched by your site or whoever prepared your 2.1.9 package. The line number of
reason = Utils.wrap(exc.reason_notice())
in the traceback does not correlate with the 2.1.9 distribution.
Is there somewhere we can see the actual contents of the /opt/mailman/Mailman/Handlers/Hold.py module that's on your system?
Does your Hold.py have the following near the beginning of hold_for_approval?
# XXX We use the weird type(type) construct below because in Python
2.1, # type is a function not a type and so can't be used as the second # argument in isinstance(). However, in Python 2.5, exceptions are # new-style classes and so are not of ClassType. if isinstance(exc, ClassType) or isinstance(exc, type(type)): # Go ahead and instantiate it now. exc = exc()
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Simon Helson wrote:
hold_for_approval(mlist, msg, msgdata, ImplicitDestination)
Note that in this specific case, we are attempting to hold the message for "implicit destination". Unless the pipeline has been rearranged, a post from a non-member should have been held in the "Moderate" handler before ever getting this far.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (4)
-
Brad Knowles
-
Mark Sapiro
-
Simon Helson
-
Todd Zullinger