Merge authors:
Malte S. Stretz (mss)
Related merge proposals:
https://code.launchpad.net/~mss/mailman/2.1-sender-header/+merge/28901
proposed by: Malte S. Stretz (mss)
review: Approve - Mark Sapiro (msapiro)
------------------------------------------------------------
revno: 1245 [merge]
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Sat 2010-07-03 13:59:22 -0700
message:
Merged optional Sender: header feature from lp:~mss/mailman/2.1-sender-header.
modified:
Mailman/Defaults.py.in
Mailman/Gui/General.py
Mailman/Handlers/SMTPDirect.py
Mailman/MailList.py
Mailman/Version.py
Mailman/versions.py
NEWS
--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1
Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Defaults.py.in'
--- Mailman/Defaults.py.in 2010-05-12 22:04:17 +0000
+++ Mailman/Defaults.py.in 2010-06-29 16:01:58 +0000
@@ -1040,6 +1040,14 @@
# lists with no archives).
ALLOW_RFC2369_OVERRIDES = Yes
+# RFC 2822 suggests that not adding a Sender header when Mailman is the agent
+# responsible for the actual transmission is a breach of the RFC. However,
+# some MUAs (notably Outlook) tend to display the Sender header instead of the
+# From details, confusing users and actually losing the original sender when
+# forwarding mail. By setting this variable to Yes, list owners will be
+# given the option to avoid setting this header.
+ALLOW_SENDER_OVERRIDES = Yes
+
# Defaults for content filtering on mailing lists. DEFAULT_FILTER_CONTENT is
# a flag which if set to true, turns on content filtering.
DEFAULT_FILTER_CONTENT = No
=== modified file 'Mailman/Gui/General.py'
--- Mailman/Gui/General.py 2007-12-04 19:52:18 +0000
+++ Mailman/Gui/General.py 2010-07-03 20:59:22 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2007 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2010 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
@@ -414,6 +414,29 @@
does not affect the inclusion of the other <tt>List-*:</tt>
headers.)"""))
)
+ # Suppression of Sender header modification
+ if mm_cfg.ALLOW_SENDER_OVERRIDES:
+ rtn.append(
+ ('include_sender_header', mm_cfg.Radio,
+ (_('No'), _('Yes')), 0,
+ _("""Should the <tt>Sender</tt> header be rewritten for this
+ mailing list to avoid stray bounces? <em>Yes</em> is
+ recommended."""),
+
+ _(""""<a href="http://www.faqs.org/rfcs/rfc2822.html">RFC
+ 2822</a> defines the <tt>Sender</tt> header and defines it
+ as "the mailbox of the agent responsible for the actual
+ transmission of the message." Mailman replaces this header
+ per default with the list's bounce address.
+
+ <p>While it is debatable if Mailman is such an agent, setting
+ this header helps directing bounces from some broken MTAs to
+ the right destination. On the other hand do some mail
+ readers show unexpected behaviour if this header is set (like
+ missing addresses in forwarded mails and copies sent to the
+ bounce address on reply-to-all), so it can be disabled
+ here."""))
+ )
# Discard held messages after this number of days
rtn.append(
=== modified file 'Mailman/Handlers/SMTPDirect.py'
--- Mailman/Handlers/SMTPDirect.py 2009-08-01 23:15:35 +0000
+++ Mailman/Handlers/SMTPDirect.py 2010-07-03 20:59:22 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2010 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
@@ -355,10 +355,26 @@
# the Sender header at all. Brad Knowles points out that MTAs tend to
# wipe existing Return-Path headers, and old MTAs may still honor
# Errors-To while new ones will at worst ignore the header.
- del msg['sender']
+ #
+ # With some MUAs (eg. Outlook 2003) rewriting the Sender header with our
+ # envelope sender causes more problems than it solves, because some will
+ # include the Sender address in a reply-to-all, which is not only
+ # confusing to subscribers, but can actually disable/unsubscribe them from
+ # lists, depending on how often they accidentally reply to it. Also, when
+ # forwarding mail inline, the sender is replaced with the string "Full
+ # Name (on behalf [email protected])", essentially losing the original
+ # sender address.
+ #
+ # The drawback of not touching the Sender: header is that some MTAs might
+ # still send bounces to it, so by not trapping it, we can miss bounces.
+ # (Or worse, MTAs might send bounces to the From: address if they can't
+ # find a Sender: header.) So instead of completely disabling the sender
+ # rewriting, we offer an option to disable it.
del msg['errors-to']
- msg['Sender'] = envsender
msg['Errors-To'] = envsender
+ if mlist.include_sender_header:
+ del msg['sender']
+ msg['Sender'] = envsender
# Get the plain, flattened text of the message, sans unixfrom
# using our as_string() method to not mangle From_ and not fold
# sub-part headers possibly breaking signatures.
=== modified file 'Mailman/MailList.py'
--- Mailman/MailList.py 2010-02-27 17:57:24 +0000
+++ Mailman/MailList.py 2010-06-29 16:01:58 +0000
@@ -363,6 +363,7 @@
self.available_languages = []
self.include_rfc2369_headers = 1
self.include_list_post_header = 1
+ self.include_sender_header = 1
self.filter_mime_types = mm_cfg.DEFAULT_FILTER_MIME_TYPES
self.pass_mime_types = mm_cfg.DEFAULT_PASS_MIME_TYPES
self.filter_filename_extensions = \
=== modified file 'Mailman/Version.py'
--- Mailman/Version.py 2009-12-22 17:24:03 +0000
+++ Mailman/Version.py 2010-07-03 20:59:22 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2010 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
@@ -37,7 +37,7 @@
(REL_LEVEL << 4) | (REL_SERIAL << 0))
# config.pck schema version number
-DATA_FILE_VERSION = 97
+DATA_FILE_VERSION = 98
# qfile/*.db schema version number
QFILE_SCHEMA_VERSION = 3
=== modified file 'Mailman/versions.py'
--- Mailman/versions.py 2007-11-25 07:08:04 +0000
+++ Mailman/versions.py 2010-07-03 20:59:22 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2007 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2010 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
@@ -353,6 +353,7 @@
add_only_if_missing('send_goodbye_msg', mm_cfg.DEFAULT_SEND_GOODBYE_MSG)
add_only_if_missing('include_rfc2369_headers', 1)
add_only_if_missing('include_list_post_header', 1)
+ add_only_if_missing('include_sender_header', 1)
add_only_if_missing('bounce_score_threshold',
mm_cfg.DEFAULT_BOUNCE_SCORE_THRESHOLD)
add_only_if_missing('bounce_info_stale_after',
=== modified file 'NEWS'
--- NEWS 2010-07-02 19:44:13 +0000
+++ NEWS 2010-07-03 20:59:22 +0000
@@ -1,11 +1,26 @@
Mailman - The GNU Mailing List Management System
-Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
+Copyright (C) 1998-2010 by the Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Here is a history of user visible changes to Mailman.
2.1.14 (xx-xxx-xxxx)
+ New Features
+
+ - A new feature for controlling the addition/replacement of the Sender:
+ header in outgoing mail has been implemented. This allows a list owner
+ to set include_sender_header on the list's General Options page in the
+ admin GUI. The default for this setting is Yes which preserves the prior
+ behavior of removing any pre-existing Sender: and setting it to the
+ list's -bounces address. Setting this to No stops Mailman from adding or
+ modifying the Sender: at all.
+
+ Additionally, there is a new Defaults.py/mm_cfg.py setting
+ ALLOW_SENDER_OVERRIDES which defaults to Yes but which can be set to No
+ to remove the include_sender_header setting from General Options, and
+ thus preserve the prior behavior completely.
+
i18n
- Updated Finnish translation from Joni Töyrylä.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org