summaryrefslogtreecommitdiff
path: root/Mailman
diff options
context:
space:
mode:
authorbwarsaw2001-10-01 16:36:30 +0000
committerbwarsaw2001-10-01 16:36:30 +0000
commit96aec99f845af72c50a85ee562b3f1ce9e096114 (patch)
tree23837f0bfffa45ea2753ba93621782d9a872e29c /Mailman
parent128a45e435cb00a19c81dedc408a18efd0ea448f (diff)
downloadmailman-96aec99f845af72c50a85ee562b3f1ce9e096114.tar.gz
mailman-96aec99f845af72c50a85ee562b3f1ce9e096114.tar.zst
mailman-96aec99f845af72c50a85ee562b3f1ce9e096114.zip
Mostly cosmetic.
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Handlers/CookHeaders.py10
-rw-r--r--Mailman/Handlers/Personalize.py5
2 files changed, 2 insertions, 13 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py
index 9b41f2321..94d133d65 100644
--- a/Mailman/Handlers/CookHeaders.py
+++ b/Mailman/Handlers/CookHeaders.py
@@ -56,17 +56,14 @@ def process(mlist, msg, msgdata):
elif prefix and not re.search(re.escape(prefix), subject, re.I):
del msg['subject']
msg['Subject'] = prefix + subject
- #
# get rid of duplicate headers
del msg['sender']
del msg['errors-to']
msg['Sender'] = msgdata.get('errorsto', adminaddr)
msg['Errors-To'] = msgdata.get('errorsto', adminaddr)
- #
# Mark message so we know we've been here, but leave any existing
# X-BeenThere's intact.
msg['X-BeenThere'] = mlist.GetListEmail()
- #
# Add Precedence: and other useful headers. None of these are standard
# and finding information on some of them are fairly difficult. Some are
# just common practice, and we'll add more here as they become necessary.
@@ -86,7 +83,6 @@ def process(mlist, msg, msgdata):
# want the value to be `list'.
if not msg.get('precedence'):
msg['Precedence'] = 'bulk'
- #
# Reply-To: munging. Do not do this if the message is "fast tracked",
# meaning it is internally crafted and delivered to a specific user. BAW:
# Yuck, I really hate this feature but I've caved under the sheer pressure
@@ -113,7 +109,6 @@ def process(mlist, msg, msgdata):
if xreplyto:
del msg['x-reply-to']
msg['X-Reply-To'] = xreplyto
- #
# Add list-specific headers as defined in RFC 2369 and RFC 2919, but only
# if the message is being crafted for a specific list (e.g. not for the
# password reminders).
@@ -123,9 +118,8 @@ def process(mlist, msg, msgdata):
# headers by default, pissing off their users. Too bad. Fix the MUAs.
if msgdata.get('_nolist'):
return
- #
# Pre-calculate
- listid = '<%s.%s>' % (mlist._internal_name, mlist.host_name)
+ listid = '<%s.%s>' % (mlist.internal_name(), mlist.host_name)
if mlist.description:
listid = mlist.description + ' ' + listid
requestaddr = mlist.GetRequestEmail()
@@ -138,7 +132,6 @@ def process(mlist, msg, msgdata):
'List-Subscribe' : subfieldfmt % (listinfo, requestaddr, ''),
'List-Post' : '<mailto:%s>' % mlist.GetListEmail(),
}
- #
# First we delete any pre-existing headers because the RFC permits only
# one copy of each, and we want to be sure it's ours.
for h, v in headers.items():
@@ -149,7 +142,6 @@ def process(mlist, msg, msgdata):
if len(h) + 2 + len(v) > 78:
v = CONTINUATION.join(v.split(', '))
msg[h] = v
- #
# Always delete List-Archive header, but only add it back if the list is
# actually archiving
del msg['list-archive']
diff --git a/Mailman/Handlers/Personalize.py b/Mailman/Handlers/Personalize.py
index a7a73e6c0..fec9d0524 100644
--- a/Mailman/Handlers/Personalize.py
+++ b/Mailman/Handlers/Personalize.py
@@ -31,10 +31,9 @@ def process(mlist, msg, msgdata):
# everything else.
newpipeline = ['Decorate', 'ToOutgoing']
inq = get_switchboard(mm_cfg.INQUEUE_DIR)
-
# Save the original To: line
originalto = msg['To']
-
+ # Create a separate message for each recipient
for member in msgdata.get('recips', []):
metadatacopy = msgdata.copy()
metadatacopy['pipeline'] = newpipeline
@@ -47,11 +46,9 @@ def process(mlist, msg, msgdata):
else:
msg['To'] = member
inq.enqueue(msg, metadatacopy, listname=mlist.internal_name())
-
# Restore the original To: line
del msg['To']
msg['To'] = originalto
-
# Don't let the normal ToOutgoing processing actually send the original
# copy.
del msgdata['recips']