aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMailman/Defaults.py.in7
-rw-r--r--Mailman/Gui/General.py13
-rw-r--r--Mailman/Handlers/AvoidDuplicates.py9
-rw-r--r--Mailman/MailList.py1
-rw-r--r--Mailman/Version.py2
-rw-r--r--Mailman/versions.py1
-rw-r--r--NEWS4
7 files changed, 34 insertions, 3 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in
index 594674ca..b45abf7b 100755
--- a/Mailman/Defaults.py.in
+++ b/Mailman/Defaults.py.in
@@ -1443,6 +1443,13 @@ OWNERS_CAN_PRESERVE_FILTERED_MESSAGES = Yes
# Check for administrivia in messages sent to the main list?
DEFAULT_ADMINISTRIVIA = Yes
+# The process which avoids sending a list copy of a message to a member who
+# is also directly addressed in To: or Cc: can drop the address from Cc: to
+# avoid growing a long Cc: list in long threads. This can be undesirable as
+# it can break DKIM signatures and possibly cause confusion. To avoid changes
+# to Cc: headers, set the list's drop_cc to No.
+DEFAULT_DROP_CC = Yes
+
#####
diff --git a/Mailman/Gui/General.py b/Mailman/Gui/General.py
index dfde6309..86ddf933 100644
--- a/Mailman/Gui/General.py
+++ b/Mailman/Gui/General.py
@@ -505,6 +505,19 @@ class General(GUIBase):
here."""))
)
+ # Do we munge Cc: in AvoidDuplicates.py
+ rtn.append(
+ ('drop_cc', mm_cfg.Radio,
+ (_('No'), _('Yes')), 0,
+ _('Should duplicate avoidance drop addresses from Cc: headers'),
+ _("""The process which avoids sending a list copy of a message to
+ a member who is also directly addressed in To: or Cc: can drop
+ the address from Cc: to avoid growing a long Cc: list in long
+ threads. This can be undesirable as it can break DKIM
+ signatures and possibly cause confusion. To avoid changes to
+ Cc: headers, set this to No."""))
+ )
+
# Discard held messages after this number of days
rtn.append(
('max_days_to_hold', mm_cfg.Number, 7, 0,
diff --git a/Mailman/Handlers/AvoidDuplicates.py b/Mailman/Handlers/AvoidDuplicates.py
index 25c1b410..0e6e2229 100644
--- a/Mailman/Handlers/AvoidDuplicates.py
+++ b/Mailman/Handlers/AvoidDuplicates.py
@@ -53,6 +53,7 @@ def process(mlist, msg, msgdata):
explicit_recips[addr.lower()] = True
# Figure out the set of explicit recipients
ccaddrs = {}
+ munge_cc = False
for header in ('to', 'cc', 'resent-to', 'resent-cc'):
addrs = getaddresses(msg.get_all(header, []))
if header == 'cc':
@@ -88,6 +89,7 @@ def process(mlist, msg, msgdata):
newrecips.append(r)
elif ccaddrs.has_key(r.lower()):
del ccaddrs[r.lower()]
+ munge_cc = True
else:
# Otherwise, this is the first time they've been in the recips
# list. Add them to the newrecips list and flag them as having
@@ -96,10 +98,13 @@ def process(mlist, msg, msgdata):
# Set the new list of recipients
msgdata['recips'] = newrecips
# RFC 2822 specifies zero or one CC header
- if ccaddrs:
+ if ccaddrs and mlist.drop_cc and munge_cc:
+ # There are remaining Ccs and we've dropped one or more and the list
+ # allows changing.
change_header('Cc',
COMMASPACE.join([formataddr(i) for i in ccaddrs.values()]),
mlist, msg, msgdata)
- else:
+ elif not ccaddrs and mlist.drop_cc:
+ # The list allows changing and there are no remaining Ccs
del msg['cc']
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index f4b38b49..b85b1427 100644
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -386,6 +386,7 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
self.obscure_addresses = mm_cfg.DEFAULT_OBSCURE_ADDRESSES
self.admin_member_chunksize = mm_cfg.DEFAULT_ADMIN_MEMBER_CHUNKSIZE
self.administrivia = mm_cfg.DEFAULT_ADMINISTRIVIA
+ self.drop_cc = mm_cfg.DEFAULT_DROP_CC
self.preferred_language = mm_cfg.DEFAULT_SERVER_LANGUAGE
self.available_languages = []
self.include_rfc2369_headers = 1
diff --git a/Mailman/Version.py b/Mailman/Version.py
index f607c126..dd43f7d0 100644
--- a/Mailman/Version.py
+++ b/Mailman/Version.py
@@ -37,7 +37,7 @@ HEX_VERSION = ((MAJOR_REV << 24) | (MINOR_REV << 16) | (MICRO_REV << 8) |
(REL_LEVEL << 4) | (REL_SERIAL << 0))
# config.pck schema version number
-DATA_FILE_VERSION = 111
+DATA_FILE_VERSION = 112
# qfile/*.db schema version number
QFILE_SCHEMA_VERSION = 3
diff --git a/Mailman/versions.py b/Mailman/versions.py
index d317a46d..6f83df16 100644
--- a/Mailman/versions.py
+++ b/Mailman/versions.py
@@ -508,6 +508,7 @@ def NewVars(l):
mm_cfg.DEFAULT_EQUIVALENT_DOMAINS)
add_only_if_missing('new_member_options',
mm_cfg.DEFAULT_NEW_MEMBER_OPTIONS)
+ add_only_if_missing('drop_cc', mm_cfg.DEFAULT_DROP_CC)
# Emergency moderation flag
add_only_if_missing('emergency', 0)
add_only_if_missing('hold_and_cmd_autoresponses', {})
diff --git a/NEWS b/NEWS
index 01f8a34a..bdb7fd7e 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,10 @@ Here is a history of user visible changes to Mailman.
now has a feature to sync the list's membership with a list of email
addresses as with the bin/sync_members command.
+ - There is a new drop_cc list attribute set from DEFAULT_DROP_CC. This
+ controls the dropping of addresses from the Cc: header in delivered
+ messages by the duplicate avoidance process. (LP: #1845751)
+
i18n
- The Japanese translation has been updated by Yasuhito FUTATSUKI.