[Mailman-Developers] My admins speak out...
Barry A. Warsaw
barry@wooz.org
Tue, 31 Oct 2000 17:05:14 -0500 (EST)
>>>>> "CVR" == Chuq Von Rospach <chuqui@plaidworks.com> writes:
CVR> Okay, my admins on www.lists.apple.com have had a chance ot
CVR> dig out from the upgrade, and are starting to speak out...
CVR> And they ALL want an option to auto-reject mail sent from
CVR> unsubscribed users.
CVR> Barry, can we squeeze something like this into 2.0? (he says,
CVR> doubting it...) technically, it shouldn't be too tough, from
CVR> a quick glance.
No it shouldn't be too tough, but no it's too late to go into 2.0.
Here's a quick sketch of a hack though (untested).
If you want to make this list-specific, use bin/withlist to set an
attribute on the lists that should have this behavior. Let's call it
`auto_reject':
-------------------- snip snip --------------------autoreject.py
def autoreject(m):
m.auto_reject = 1
m.Save()
-------------------- snip snip --------------------
% python bin/withlist -r autoreject -l mylist
Now, in Mailman/Handlers/Hold.py find the stanza where NonMemberPost
is raised. Change the hold_for_approval line to something like:
if getattr(mlist, 'auto_reject', 0):
raise DiscardMessage
else:
hold_for_approval(mlist, msg, msgdata, NonMemberPost)
Doing the GUI is a bit more work, and it would be nice if each of the
hold conditions could be optionally discarded, so that's another
reason to wait and do it right for 2.1.
-Barry