summaryrefslogtreecommitdiff
path: root/Mailman/Handlers/Approve.py
diff options
context:
space:
mode:
authorbwarsaw2000-05-08 17:28:19 +0000
committerbwarsaw2000-05-08 17:28:19 +0000
commit58a17b9f5a8763c1ea9224ee4e7c72c3e11e4197 (patch)
treeba0d2fb11ee5fe6b58ab6ad6c1ca8f724daca964 /Mailman/Handlers/Approve.py
parentc6096572df688db5ad73ad74f8500de2a44cd899 (diff)
downloadmailman-58a17b9f5a8763c1ea9224ee4e7c72c3e11e4197.tar.gz
mailman-58a17b9f5a8763c1ea9224ee4e7c72c3e11e4197.tar.zst
mailman-58a17b9f5a8763c1ea9224ee4e7c72c3e11e4197.zip
Diffstat (limited to 'Mailman/Handlers/Approve.py')
-rw-r--r--Mailman/Handlers/Approve.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/Mailman/Handlers/Approve.py b/Mailman/Handlers/Approve.py
index b61603a54..ee96bce0b 100644
--- a/Mailman/Handlers/Approve.py
+++ b/Mailman/Handlers/Approve.py
@@ -28,20 +28,15 @@ import HandlerAPI
from Mailman import mm_cfg
from Mailman import Errors
-
-class NotApproved(HandlerAPI.HandlerError):
- pass
-
-
# multiple inheritance for backwards compatibility
-class LoopError(NotApproved, Errors.MMLoopingPost):
- pass
+class LoopError(HandlerAPI.DiscardMessage, Errors.MMLoopingPost):
+ """We've seen this message before"""
-def process(mlist, msg):
+def process(mlist, msg, msgdata):
# short circuits
- if getattr(msg, 'approved', 0):
+ if msgdata.get('approved'):
# digests, Usenet postings, and some other messages come
# pre-approved. TBD: we may want to further filter Usenet messages,
# so the test above may not be entirely correct.
@@ -52,7 +47,7 @@ def process(mlist, msg):
# TBD: should we definitely deny if the password exists but does not
# match? For now we'll let it percolate up for further
# determination.
- msg.approved = 1
+ msgdata['approved'] = 1
# has this message already been posted to this list?
beentheres = map(filterfunc, msg.getallmatchingheaders('x-beenthere'))
if mlist.GetListEmail() in beentheres: