Abhilash Raj pushed to branch master at GNU Mailman / Mailman Core
Commits: 9de4f7d3 by Mark Sapiro at 2020-05-09T09:31:13-07:00 Add RFC 2369 headers to notification messages. - - - - - bde67ed8 by Abhilash Raj at 2020-05-09T21:24:41+00:00 Merge branch 'fix_710' into 'master' Add RFC 2369 headers to notification messages. Closes #710 See merge request mailman/mailman!634 - - - - - 4 changed files: - src/mailman/core/tests/test_pipelines.py - src/mailman/docs/NEWS.rst - src/mailman/email/tests/test_message.py - src/mailman/pipelines/virgin.py Changes: ===================================== src/mailman/core/tests/test_pipelines.py ===================================== @@ -104,6 +104,14 @@ testing self.assertEqual(self._msg['list-id'], '<test.example.com>') self.assertEqual(self._msg['list-post'], '<mailto:t...@example.com>') + def test_rfc2369_headers_virgin(self): + # Internally crafted messages should get reduced List-* headers. + msgdata = {'reduced_list_headers': True} + process(self._mlist, self._msg, msgdata, + pipeline_name='virgin') + self.assertEqual(self._msg['list-id'], '<test.example.com>') + self.assertIsNone(self._msg['list-post']) + def test_discarding_pipeline(self): # If a handler in the pipeline raises DiscardMessage, the message will # be thrown away, but with a log message. ===================================== src/mailman/docs/NEWS.rst ===================================== @@ -17,6 +17,7 @@ Bugs ---- * When importing 2.1 lists, ignore CR characters added by browsers in headers and footers. (Closes #701) +* RFC 2369 headers are now added to notification messages. (Closes #710) 3.3.1 ===================================== src/mailman/email/tests/test_message.py ===================================== @@ -53,6 +53,12 @@ class TestMessage(unittest.TestCase): self.assertEqual(items[0].msg.get_all('precedence'), ['omg wtf bbq']) + def test_reduced_rfc_2369_headers(self): + # Notifications should get reduced List-* headers. + self._msg.send(self._mlist) + items = get_queue_messages('virgin', expected_count=1) + self.assertTrue(items[0].msgdata.get('reduced_list_headers')) + class TestMessageSubclass(unittest.TestCase): layer = ConfigLayer ===================================== src/mailman/pipelines/virgin.py ===================================== @@ -33,5 +33,6 @@ class VirginPipeline(BasePipeline): _default_handlers = ( 'cook-headers', + 'rfc-2369', 'to-outgoing', ) View it on GitLab: https://gitlab.com/mailman/mailman/-/compare/daea7c458cfe63900344e075e328a57c7b7d9926...bde67ed83301f07f0fd01b2b0e7b7b23749e4acc -- View it on GitLab: https://gitlab.com/mailman/mailman/-/compare/daea7c458cfe63900344e075e328a57c7b7d9926...bde67ed83301f07f0fd01b2b0e7b7b23749e4acc You're receiving this email because of your account on gitlab.com.
_______________________________________________ Mailman-checkins mailing list -- mailman-checkins@python.org To unsubscribe send an email to mailman-checkins-le...@python.org https://mail.python.org/mailman3/lists/mailman-checkins.python.org/ Member address: arch...@jab.org