diff options
| author | bwarsaw | 2000-06-23 04:22:54 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-06-23 04:22:54 +0000 |
| commit | 31ce3871b87ed5e161f32ff3a4a3385d3099797a (patch) | |
| tree | 57c086285a0fbae300376afbdf8d60f4489a680a | |
| parent | 28534b5ee130b5455e9e304cf5b2e81704892551 (diff) | |
| download | mailman-31ce3871b87ed5e161f32ff3a4a3385d3099797a.tar.gz mailman-31ce3871b87ed5e161f32ff3a4a3385d3099797a.tar.zst mailman-31ce3871b87ed5e161f32ff3a4a3385d3099797a.zip | |
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!
| -rw-r--r-- | Mailman/Handlers/Hold.py | 4 |
1 files 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) |
