[Mailman-Users] Error when sending from an unsubscribed address

Mark Sapiro msapiro at value.net
Wed Jul 11 00:14:41 CEST 2007

Simon Helson wrote:

>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.

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

    # XXX We use the weird type(type) construct below because in Python
    # 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()

>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
>    status = self._dopipeline(mlist, msg, msgdata, pipeline)
>  File "/opt/mailman/Mailman/Queue/IncomingRunner.py", line 152, in
>    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
>    reason = Utils.wrap(exc.reason_notice())
>TypeError: unbound method reason_notice() must be called with
>ImplicitDestination instance as first argument (got nothing instead)

Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list