Merge lp:~mss/mailman/2.2-sender-header into lp:mailman/2.2

Proposed by Malte S. Stretz
Status: Merged
Merge reported by: Mark Sapiro
Merged at revision: not available
Proposed branch: lp:~mss/mailman/2.2-sender-header
Merge into: lp:mailman/2.2
Diff against target: 122 lines (+52/-3)
6 files modified
Mailman/Defaults.py.in (+8/-0)
Mailman/Gui/General.py (+23/-0)
Mailman/Handlers/SMTPDirect.py (+18/-2)
Mailman/MailList.py (+1/-0)
Mailman/Version.py (+1/-1)
Mailman/versions.py (+1/-0)
To merge this branch: bzr merge lp:~mss/mailman/2.2-sender-header
Reviewer Review Type Date Requested Status
Mark Sapiro Approve
Review via email: mp+28902@code.launchpad.net

Description of the change

This is essentially the same change as proposed here <https://code.launchpad.net/~mss/mailman/2.1-sender-header/+merge/28901> for 2.1.

To post a comment you must log in.
lp:~mss/mailman/2.2-sender-header updated
1115. By Malte S. Stretz

Bump DATA_FILE_VERSION.

Revision history for this message
Mark Sapiro (msapiro) wrote :

Looks good except the DATA_FILE_VERSION was bumped to 200 instead of 100.

I will make that change and commit the merge.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Mailman/Defaults.py.in'
2--- Mailman/Defaults.py.in 2010-05-12 22:02:49 +0000
3+++ Mailman/Defaults.py.in 2010-06-30 15:33:35 +0000
4@@ -1045,6 +1045,14 @@
5 # lists with no archives).
6 ALLOW_RFC2369_OVERRIDES = Yes
7
8+# RFC 2822 suggests that not adding a Sender header when Mailman is the agent
9+# responsible for the actual transmission is a breach of the RFC. However,
10+# some MUAs (notably Outlook) tend to display the Sender header instead of the
11+# From details, confusing users and actually losing the original sender when
12+# forwarding mail. By setting this variable to Yes, list owners will be
13+# given the option to avoid setting this header.
14+ALLOW_SENDER_OVERRIDES = Yes
15+
16 # Defaults for content filtering on mailing lists. DEFAULT_FILTER_CONTENT is
17 # a flag which if set to true, turns on content filtering.
18 DEFAULT_FILTER_CONTENT = No
19
20=== modified file 'Mailman/Gui/General.py'
21--- Mailman/Gui/General.py 2007-12-04 19:52:18 +0000
22+++ Mailman/Gui/General.py 2010-06-30 15:33:35 +0000
23@@ -414,6 +414,29 @@
24 does not affect the inclusion of the other <tt>List-*:</tt>
25 headers.)"""))
26 )
27+ # Suppression of Sender header modification
28+ if mm_cfg.ALLOW_SENDER_OVERRIDES:
29+ rtn.append(
30+ ('include_sender_header', mm_cfg.Radio,
31+ (_('No'), _('Yes')), 0,
32+ _("""Should the <tt>Sender</tt> header be rewritten for this
33+ mailing list to avoid stray bounces? <em>Yes</em> is
34+ recommended."""),
35+
36+ _(""""<a href="http://www.faqs.org/rfcs/rfc2822.html">RFC
37+ 2822</a> defines the <tt>Sender</tt> header and defines it
38+ as "the mailbox of the agent responsible for the actual
39+ transmission of the message." Mailman replaces this header
40+ per default with the list's bounce address.
41+
42+ <p>While it is debatable if Mailman is such an agent, setting
43+ this header helps directing bounces from some broken MTAs to
44+ the right destination. On the other hand do some mail
45+ readers show unexpected behaviour if this header is set (like
46+ missing addresses in forwarded mails and copies sent to the
47+ bounce address on reply-to-all), so it can be disabled
48+ here."""))
49+ )
50
51 # Discard held messages after this number of days
52 rtn.append(
53
54=== modified file 'Mailman/Handlers/SMTPDirect.py'
55--- Mailman/Handlers/SMTPDirect.py 2009-08-01 23:12:35 +0000
56+++ Mailman/Handlers/SMTPDirect.py 2010-06-30 15:33:35 +0000
57@@ -355,10 +355,26 @@
58 # the Sender header at all. Brad Knowles points out that MTAs tend to
59 # wipe existing Return-Path headers, and old MTAs may still honor
60 # Errors-To while new ones will at worst ignore the header.
61- del msg['sender']
62+ #
63+ # With some MUAs (eg. Outlook 2003) rewriting the Sender header with our
64+ # envelope sender causes more problems than it solves, because some will
65+ # include the Sender address in a reply-to-all, which is not only
66+ # confusing to subscribers, but can actually disable/unsubscribe them from
67+ # lists, depending on how often they accidentally reply to it. Also, when
68+ # forwarding mail inline, the sender is replaced with the string "Full
69+ # Name (on behalf bounce@addr.ess)", essentially losing the original
70+ # sender address.
71+ #
72+ # The drawback of not touching the Sender: header is that some MTAs might
73+ # still send bounces to it, so by not trapping it, we can miss bounces.
74+ # (Or worse, MTAs might send bounces to the From: address if they can't
75+ # find a Sender: header.) So instead of completely disabling the sender
76+ # rewriting, we offer an option to disable it.
77 del msg['errors-to']
78- msg['Sender'] = envsender
79 msg['Errors-To'] = envsender
80+ if mlist.include_sender_header:
81+ del msg['sender']
82+ msg['Sender'] = envsender
83 # Get the plain, flattened text of the message, sans unixfrom
84 # using our as_string() method to not mangle From_ and not fold
85 # sub-part headers possibly breaking signatures.
86
87=== modified file 'Mailman/MailList.py'
88--- Mailman/MailList.py 2010-02-27 18:48:20 +0000
89+++ Mailman/MailList.py 2010-06-30 15:33:35 +0000
90@@ -366,6 +366,7 @@
91 self.available_languages = []
92 self.include_rfc2369_headers = 1
93 self.include_list_post_header = 1
94+ self.include_sender_header = 1
95 self.filter_mime_types = mm_cfg.DEFAULT_FILTER_MIME_TYPES
96 self.pass_mime_types = mm_cfg.DEFAULT_PASS_MIME_TYPES
97 self.filter_filename_extensions = \
98
99=== modified file 'Mailman/Version.py'
100--- Mailman/Version.py 2009-04-18 20:02:57 +0000
101+++ Mailman/Version.py 2010-06-30 15:33:35 +0000
102@@ -37,7 +37,7 @@
103 (REL_LEVEL << 4) | (REL_SERIAL << 0))
104
105 # config.pck schema version number
106-DATA_FILE_VERSION = 99
107+DATA_FILE_VERSION = 200
108
109 # qfile/*.db schema version number
110 QFILE_SCHEMA_VERSION = 3
111
112=== modified file 'Mailman/versions.py'
113--- Mailman/versions.py 2009-04-18 20:02:57 +0000
114+++ Mailman/versions.py 2010-06-30 15:33:35 +0000
115@@ -364,6 +364,7 @@
116 add_only_if_missing('send_goodbye_msg', mm_cfg.DEFAULT_SEND_GOODBYE_MSG)
117 add_only_if_missing('include_rfc2369_headers', 1)
118 add_only_if_missing('include_list_post_header', 1)
119+ add_only_if_missing('include_sender_header', 1)
120 add_only_if_missing('bounce_score_threshold',
121 mm_cfg.DEFAULT_BOUNCE_SCORE_THRESHOLD)
122 add_only_if_missing('bounce_info_stale_after',

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: