From 31ce3871b87ed5e161f32ff3a4a3385d3099797a Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Fri, 23 Jun 2000 04:22:54 +0000 Subject: process(), hold_for_approval(): The clue that the message has come from the gate_news cronjob is that the msgdata dictionary will contain a `fromusenet' key. This was erroneously checking the msg object for the `fromusenet' attribute (as was the case with the old interface), which caused notifications to go to Usenet posters whose messages were held. Bogus! --- Mailman/Handlers/Hold.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mailman/Handlers/Hold.py b/Mailman/Handlers/Hold.py index 06f1394be..a2e9e3486 100644 --- a/Mailman/Handlers/Hold.py +++ b/Mailman/Handlers/Hold.py @@ -172,7 +172,7 @@ def process(mlist, msg, msgdata): # side of the world should never be implicitly destined if mlist.require_explicit_destination and \ not mlist.HasExplicitDest(msg) and \ - not getattr(msg, 'fromusenet', 0): + not msgdata.get('fromusenet'): # then hold_for_approval(mlist, msg, msgdata, ImplicitDestination) # no return @@ -233,7 +233,7 @@ def hold_for_approval(mlist, msg, msgdata, exc): msg = Message.UserNotification(adminaddr, adminaddr, subject, text) HandlerAPI.DeliverToUser(mlist, msg) # We may want to send a notification to the original sender too - fromusenet = getattr(msg, 'fromusenet', 0) + fromusenet = msgdata.get('fromusenet') if not fromusenet and not mlist.dont_respond_to_post_requests: subject = 'Your message to %s awaits moderator approval' % listname text = Utils.maketext('postheld.txt', d) -- cgit v1.3.1