------------------------------------------------------------
revno: 1333
committer: Mark Sapiro <[email protected]>
branch nick: 2.2
timestamp: Fri 2014-05-02 10:20:57 -0700
message:
Updated CookHeaders to always add the poster's From: address to Reply-To:
when applying from_is_list transformations.
modified:
Mailman/Handlers/CookHeaders.py
tests/test_handlers.py
--
lp:mailman/2.2
https://code.launchpad.net/~mailman-coders/mailman/2.2
Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription
=== modified file 'Mailman/Handlers/CookHeaders.py'
--- Mailman/Handlers/CookHeaders.py 2014-04-26 04:04:14 +0000
+++ Mailman/Handlers/CookHeaders.py 2014-05-02 17:20:57 +0000
@@ -166,17 +166,11 @@
# cases we'll zap the existing field because RFC 2822 says max one is
# allowed.
if not mlist.first_strip_reply_to:
- # If we Munged the From:, add it to Reply-To: if we're not
- # stripping it.
- #MAS ? Should we add it anyway?
- if o_from:
- add(o_from)
orig = msg.get_all('reply-to', [])
for pair in getaddresses(orig):
add(pair)
- # We also need to put the old From: in Reply-To: if reply_goes_to_list
- # is to the poster even if we're stripping Reply-To:
- if mlist.reply_goes_to_list == 0 and o_from:
+ # We also need to put the old From: in Reply-To: in all cases.
+ if o_from:
add(o_from)
# Set Reply-To: header to point back to this list. Add this last
# because some folks think that some MUAs make it easier to delete
=== modified file 'tests/test_handlers.py'
--- tests/test_handlers.py 2014-04-24 22:43:47 +0000
+++ tests/test_handlers.py 2014-05-02 17:20:57 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2011 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 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
@@ -646,7 +646,8 @@
""", Message.Message)
msgdata = {}
CookHeaders.process(mlist, msg, msgdata)
- eq(msgdata['add_header']['Reply-To'], '[email protected]')
+ eq(msgdata['add_header']['Reply-To'],
+ '[email protected], [email protected]')
eq(msg.get_all('reply-to'), ['[email protected]'])
def test_reply_to_explicit(self):
@@ -713,7 +714,8 @@
msgdata = {}
CookHeaders.process(self._mlist, msg, msgdata)
- eq(msgdata['add_header']['Reply-To'], '[email protected]')
+ eq(msgdata['add_header']['Reply-To'],
+ '[email protected], [email protected]')
eq(msg.get_all('reply-to'), ['[email protected]'])
def test_reply_to_extends_to_list(self):
@@ -748,7 +750,7 @@
CookHeaders.process(mlist, msg, msgdata)
eq(msgdata['add_header']['Reply-To'],
- '[email protected], [email protected], [email protected]')
+ '[email protected], [email protected], [email protected]')
def test_reply_to_extends_to_explicit(self):
eq = self.assertEqual
@@ -782,7 +784,7 @@
msgdata = {}
CookHeaders.process(mlist, msg, msgdata)
eq(msgdata['add_header']['Reply-To'],
- '[email protected], [email protected], [email protected]')
+ '[email protected], [email protected], [email protected]')
def test_list_headers_nolist(self):
eq = self.assertEqual
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org