summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2002-05-28 03:08:57 +0000
committerbwarsaw2002-05-28 03:08:57 +0000
commit90837508516ced9322bb031a87c520a4db97ba73 (patch)
tree3f2142ddf77532d164143c69c1d8990eb50fec9b
parent2abcbaf11ca2698ca70b79b2445c3330adc69f87 (diff)
downloadmailman-90837508516ced9322bb031a87c520a4db97ba73.tar.gz
mailman-90837508516ced9322bb031a87c520a4db97ba73.tar.zst
mailman-90837508516ced9322bb031a87c520a4db97ba73.zip
ackp(): New helper function.
process(): Before sending the sender a notification message, check the X-Ack: and Precedence: headers, and also see if this sender has reached their auto-response limit.
-rw-r--r--Mailman/Handlers/Hold.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/Mailman/Handlers/Hold.py b/Mailman/Handlers/Hold.py
index d4ab19f91..94beb5df8 100644
--- a/Mailman/Handlers/Hold.py
+++ b/Mailman/Handlers/Hold.py
@@ -114,6 +114,15 @@ _ = i18n._
+def ackp(msg):
+ ack = msg.get('x-ack', '').lower()
+ precedence = msg.get('precedence', '').lower()
+ if ack <> 'yes' and precedence in ('bulk', 'junk', 'list'):
+ return 0
+ return 1
+
+
+
def process(mlist, msg, msgdata):
if msgdata.get('approved'):
return
@@ -208,7 +217,8 @@ def hold_for_approval(mlist, msg, msgdata, exc):
# This message should appear to come from <list>-admin so as to handle any
# bounce processing that might be needed.
cookie = Pending.new(Pending.HELD_MESSAGE, id)
- if not fromusenet and mlist.respond_to_post_requests:
+ if not fromusenet and ackp(msg) and mlist.respond_to_post_requests and \
+ mlist.autorespondToSender(sender):
# Get a confirmation cookie
d['confirmurl'] = '%s/%s' % (mlist.GetScriptURL('confirm', absolute=1),
cookie)