Abhilash Raj pushed to branch master at GNU Mailman / Mailman Core
Commits:
431a1ecb by Mark Sapiro at 2019-03-31T01:13:01Z
Delete CC when avoid_duplicates removes all addresses.
- - - - -
0c79a9fc by Abhilash Raj at 2019-03-31T06:26:52Z
Merge branch 'fix_dups' into 'master'
Delete CC when avoid_duplicates removes all addresses.
Closes #575
See merge request mailman/mailman!490
- - - - -
3 changed files:
- src/mailman/docs/NEWS.rst
- src/mailman/handlers/avoid_duplicates.py
- src/mailman/handlers/docs/avoid-duplicates.rst
Changes:
=====================================
src/mailman/docs/NEWS.rst
=====================================
@@ -16,6 +16,11 @@ Here is a history of user visible changes to Mailman.
=====
(2019-XX-XX)
+Bugs
+----
+* A list member with ``receive_list_copy`` set to ``False`` who is addressed in
+ ``CC`` will now be removed from ``CC`` even if this results in no ``CC``.
+ (Closes #575)
REST
----
=====================================
src/mailman/handlers/avoid_duplicates.py
=====================================
@@ -102,6 +102,6 @@ class AvoidDuplicates:
# Set the new list of recipients. XXX recips should always be a set.
msgdata['recipients'] = list(newrecips)
# RFC 2822 specifies zero or one CC header
+ del msg['cc']
if cc_addresses:
- del msg['cc']
msg['CC'] = COMMASPACE.join(cc_addresses.values())
=====================================
src/mailman/handlers/docs/avoid-duplicates.rst
=====================================
@@ -78,7 +78,8 @@ or ``Resent-CC``), then they will get a list copy.
Something of great import.
<BLANKLINE>
-If they're mentioned on the ``CC`` line, they won't get a list copy.
+If they're mentioned on the ``CC`` line, they won't get a list copy and will
+be removed from the ``CC``.
>>> msg = message_from_string("""\
... From: Claire Person <[email protected]>
@@ -92,7 +93,6 @@ If they're mentioned on the ``CC`` line, they won't get a
list copy.
['[email protected]']
>>> print(msg.as_string())
From: Claire Person <[email protected]>
- CC: [email protected]
<BLANKLINE>
Something of great import.
<BLANKLINE>
View it on GitLab:
https://gitlab.com/mailman/mailman/compare/565da0acef9e90c5d7a15a78dfca4c32bc977e79...0c79a9fc0047eb017a6993c6b3099d7bcfbc5c45
--
View it on GitLab:
https://gitlab.com/mailman/mailman/compare/565da0acef9e90c5d7a15a78dfca4c32bc977e79...0c79a9fc0047eb017a6993c6b3099d7bcfbc5c45
You're receiving this email because of your account on gitlab.com.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org