Re: [Mailman-Developers] Marc Perkel's Feature Wish List
I'd like a setting so that if non-members post to the list that their messages are automatically dropped (bounced) without list owner intervention. The bounce message should be able to be customized giving the user information to join the list - or just go to hell.
I've got a patch to do that against 2.0.8 which works for new lists. If someone could tell me what the right way is to add an entry into an existing database I'd have a complete patch.
I think Mailman/versions.py::NewVars() is the one that does all that sort of stuff. It's invoked when the version change is detected in MailList.py::CheckVersion(), though, and that version number is owned by Barry/the official distro.
I think it's probably difficult to do in a patch so that it doesn't interfere with future releases.
Well, attached is the patch. If anyone who knows more can post the command for modifying the database directly, then this would useable now. Though the interface to the same functionality will obviously change for 2.1.
-Peter
On Wed, Jan 02, 2002 at 02:29:09PM -0800, Dan Mick wrote:
I'd like a setting so that if non-members post to the list that their messages are automatically dropped (bounced) without list owner intervention. The bounce message should be able to be customized giving the user information to join the list - or just go to hell.
I've got a patch to do that against 2.0.8 which works for new lists. If someone could tell me what the right way is to add an entry into an existing database I'd have a complete patch.
I think Mailman/versions.py::NewVars() is the one that does all that sort of stuff. It's invoked when the version change is detected in MailList.py::CheckVersion(), though, and that version number is owned by Barry/the official distro.
I think it's probably difficult to do in a patch so that it doesn't interfere with future releases.
Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers
-- The 5 year plan: In five years we'll make up another plan. Or just re-use this one.
Neat! Note that in MM2.1 Mailman/Bouncer.py has a method BounceMessage() that performs all the basic logic for bouncing (rejecting) a message.
-Barry
>> I've got a patch to do that against 2.0.8 which works for new
>> lists. If someone could tell me what the right way is to add
>> an entry into an existing database I'd have a complete patch.
"DM" == Dan Mick <dmick@utopia.West.Sun.COM> writes:
DM> I think Mailman/versions.py::NewVars() is the one that does
DM> all that sort of stuff. It's invoked when the version change
DM> is detected in MailList.py::CheckVersion(), though, and that
DM> version number is owned by Barry/the official distro.
DM> I think it's probably difficult to do in a patch so that it
DM> doesn't interfere with future releases.
True. Each list has an integer attribute called `data_version' and this is compared against Mailman/Versions.py::DATA_FILE_VERSION. If the latter is greater, then we run the schema updates in versions.py, which currently is a morass of every change in schema or data format since the early early 1.0 days. It's getting very close to unmaintainable.
As Dan rightly points out though, I increment DATA_FILE_VERSION whenever I add or change a MailList attribute, so for you to increment it in your patch means eventually we'll conflict and some lists may not update. But I don't think you'll need to do that.
Remember that you can always add an arbitrary attribute to a MailList object, e.g. with bin/withlist and as long as the attribute name doesn't collide with some existing attr name, and as long as it doesn't start with an underscore, Mailman's persistence mechanism will happily save and load that attribute as if it were one of its own.
So my suggestion would be to include a bin/withlist script that adds the attribute you need and then saves the list. Don't muck around with versions.py and Version.py.
-Barry
participants (3)
-
barry@zope.com
-
Dan Mick
-
Peter C. Norton