aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers
diff options
context:
space:
mode:
authorbwarsaw <>2003-03-31 21:49:43 +0000
committerbwarsaw <>2003-03-31 21:49:43 +0000
commitde777e10950eed3aff489e74908578b5759003bb (patch)
tree10711cb2e58ce6b83faf021b0cd084de58d22bc4 /Mailman/Handlers
parentfb97bfb122d119977a719f3a33673edaaae5bd37 (diff)
downloadmailman2-de777e10950eed3aff489e74908578b5759003bb.tar.gz
mailman2-de777e10950eed3aff489e74908578b5759003bb.tar.xz
mailman2-de777e10950eed3aff489e74908578b5759003bb.zip
Backporting from trunk
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/CookHeaders.py4
-rw-r--r--Mailman/Handlers/Hold.py6
-rw-r--r--Mailman/Handlers/Replybot.py6
3 files changed, 9 insertions, 7 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py
index c4ad06ab..9ef5550c 100644
--- a/Mailman/Handlers/CookHeaders.py
+++ b/Mailman/Handlers/CookHeaders.py
@@ -229,6 +229,8 @@ def prefix_subject(mlist, msg, msgdata):
if len(lines) > 1 and lines[1] and lines[1][0] in ' \t':
ws = lines[1][0]
msgdata['origsubj'] = subject
+ if not subject:
+ subject = _('(no subject)')
# The header may be multilingual; decode it from base64/quopri and search
# each chunk for the prefix. BAW: Note that if the prefix contains spaces
# and each word of the prefix is encoded in a different chunk in the
@@ -241,8 +243,6 @@ def prefix_subject(mlist, msg, msgdata):
# The subject's already got the prefix, so don't change it
return
del msg['subject']
- if not subject:
- subject = _('(no subject)')
# Get the header as a Header instance, with proper unicode conversion
h = uheader(mlist, prefix, 'Subject', continuation_ws=ws)
for s, c in headerbits:
diff --git a/Mailman/Handlers/Hold.py b/Mailman/Handlers/Hold.py
index 15223959..c3a6d6f8 100644
--- a/Mailman/Handlers/Hold.py
+++ b/Mailman/Handlers/Hold.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -197,6 +197,7 @@ def hold_for_approval(mlist, msg, msgdata, exc):
exc = exc()
listname = mlist.real_name
sender = msgdata.get('sender', msg.get_sender())
+ message_id = msg.get('message-id', 'n/a')
owneraddr = mlist.GetOwnerEmail()
adminaddr = mlist.GetBouncesEmail()
requestaddr = mlist.GetRequestEmail()
@@ -274,7 +275,8 @@ also appear in the first line of the body of the reply.""")),
finally:
i18n.set_translation(otranslation)
# Log the held message
- syslog('vette', '%s post from %s held: %s', listname, sender, reason)
+ syslog('vette', '%s post from %s held, message-id=%s: %s',
+ listname, sender, message_id, reason)
# raise the specific MessageHeld exception to exit out of the message
# delivery pipeline
raise exc
diff --git a/Mailman/Handlers/Replybot.py b/Mailman/Handlers/Replybot.py
index 8a9be5cb..30fbb512 100644
--- a/Mailman/Handlers/Replybot.py
+++ b/Mailman/Handlers/Replybot.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -71,8 +71,8 @@ def process(mlist, msg, msgdata):
# Okay, we know we're going to auto-respond to this sender, craft the
# message, send it, and update the database.
realname = mlist.real_name
- subject = _('Auto-response for your message to ') + \
- msg.get('to', _('the "%(realname)s" mailing list'))
+ subject = _(
+ 'Auto-response for your message to the "%(realname)s" mailing list')
# Do string interpolation
d = SafeDict({'listname' : realname,
'listurl' : mlist.GetScriptURL('listinfo'),