------------------------------------------------------------ revno: 1825 fixes bug: https://launchpad.net/bugs/1845751 committer: Mark Sapiro <m...@msapiro.net> branch nick: 2.1 timestamp: Fri 2019-11-08 13:04:52 -0800 message: Implement new drop_cc switch. modified: Mailman/Defaults.py.in Mailman/Gui/General.py Mailman/Handlers/AvoidDuplicates.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 2019-06-19 23:56:49 +0000 +++ Mailman/Defaults.py.in 2019-11-08 21:04:52 +0000 @@ -1443,6 +1443,13 @@ # 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 + ##### === modified file 'Mailman/Gui/General.py' --- Mailman/Gui/General.py 2018-04-11 09:36:40 +0000 +++ Mailman/Gui/General.py 2019-11-08 21:04:52 +0000 @@ -505,6 +505,19 @@ 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, === modified file 'Mailman/Handlers/AvoidDuplicates.py' --- Mailman/Handlers/AvoidDuplicates.py 2018-06-17 23:47:34 +0000 +++ Mailman/Handlers/AvoidDuplicates.py 2019-11-08 21:04:52 +0000 @@ -53,6 +53,7 @@ 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 @@ 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 @@ # 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'] === modified file 'Mailman/MailList.py' --- Mailman/MailList.py 2019-01-29 05:48:13 +0000 +++ Mailman/MailList.py 2019-11-08 21:04:52 +0000 @@ -386,6 +386,7 @@ 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 === modified file 'Mailman/Version.py' --- Mailman/Version.py 2019-01-08 06:25:41 +0000 +++ Mailman/Version.py 2019-11-08 21:04:52 +0000 @@ -37,7 +37,7 @@ (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 === modified file 'Mailman/versions.py' --- Mailman/versions.py 2018-11-30 22:53:02 +0000 +++ Mailman/versions.py 2019-11-08 21:04:52 +0000 @@ -508,6 +508,7 @@ 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', {}) === modified file 'NEWS' --- NEWS 2019-10-05 16:32:32 +0000 +++ NEWS 2019-11-08 21:04:52 +0000 @@ -34,6 +34,10 @@ 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.
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org