Barry Warsaw pushed to branch master at mailman / Mailman
Commits: fd4dd866 by Francesco Ariis at 2016-08-25T08:35:12+02:00 Added unsubscribe instructions to list:member:generic:footer.txt - - - - - 5 changed files: - src/mailman/app/docs/pipelines.rst - src/mailman/runners/docs/digester.rst - src/mailman/templates/en/list:member:generic:footer.txt - src/mailman/utilities/importer.py - src/mailman/utilities/tests/test_import.py Changes: ===================================== src/mailman/app/docs/pipelines.rst ===================================== --- a/src/mailman/app/docs/pipelines.rst +++ b/src/mailman/app/docs/pipelines.rst @@ -61,8 +61,8 @@ etc. <BLANKLINE> First post! _______________________________________________ - Test mailing list - t...@example.com + Test mailing list -- t...@example.com + To unsubscribe send an email to test-le...@example.com <BLANKLINE> The message metadata has information about recipients and other stuff. @@ -134,8 +134,8 @@ delivered to end recipients. First post! <BLANKLINE> _______________________________________________ - Test mailing list - t...@example.com + Test mailing list -- t...@example.com + To unsubscribe send an email to test-le...@example.com >>> dump_msgdata(messages[0].msgdata) _parsemsg : False ===================================== src/mailman/runners/docs/digester.rst ===================================== --- a/src/mailman/runners/docs/digester.rst +++ b/src/mailman/runners/docs/digester.rst @@ -218,8 +218,8 @@ The MIME digest has lots of good stuff, all contained in the multipart. Content-Description: Digest Footer <BLANKLINE> _______________________________________________ - Test mailing list - t...@example.com + Test mailing list -- t...@example.com + To unsubscribe send an email to test-le...@example.com <BLANKLINE> --===============...==-- <BLANKLINE> @@ -295,8 +295,8 @@ The RFC 1153 contains the digest in a single plain text message. Subject: Digest Footer <BLANKLINE> _______________________________________________ - Test mailing list - t...@example.com + Test mailing list -- t...@example.com + To unsubscribe send an email to test-le...@example.com <BLANKLINE> <BLANKLINE> ------------------------------ ===================================== src/mailman/templates/en/list:member:generic:footer.txt ===================================== --- a/src/mailman/templates/en/list:member:generic:footer.txt +++ b/src/mailman/templates/en/list:member:generic:footer.txt @@ -1,3 +1,3 @@ _______________________________________________ -$display_name mailing list -$listname +$display_name mailing list -- $listname +To unsubscribe send an email to ${short_listname}-leave@${domain} ===================================== src/mailman/utilities/importer.py ===================================== --- a/src/mailman/utilities/importer.py +++ b/src/mailman/utilities/importer.py @@ -388,8 +388,10 @@ def import_config_pck(mlist, config_dict): # order dependent; the longer substitution with the common prefix must # show up earlier. convert_placeholders = [ - ('%(real_name)s@%(host_name)s', '$listname'), - ('%(real_name)s', '$display_name'), + ('%(real_name)s@%(host_name)s', + 'To unsubscribe send an email to ${short_listname}-leave@${domain}'), + ('%(real_name)s mailing list', + '$display_name mailing list -- $listname'), # The generic footers no longer have URLs in them. ('%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s\n', ''), ] ===================================== src/mailman/utilities/tests/test_import.py ===================================== --- a/src/mailman/utilities/tests/test_import.py +++ b/src/mailman/utilities/tests/test_import.py @@ -666,8 +666,10 @@ class TestConvertToURI(unittest.TestCase): def test_substitutions(self): test_text = ('UNIT TESTING %(real_name)s mailing list\n' '%(real_name)s@%(host_name)s') - expected_text = ('UNIT TESTING $display_name mailing list\n' - '$listname') + expected_text = ('UNIT TESTING $display_name mailing list ' + '-- $listname\n' + 'To unsubscribe send an email to ' + '${short_listname}-leave@${domain}') for oldvar, newvar in self._conf_mapping.items(): self._pckdict[str(oldvar)] = str(test_text) import_config_pck(self._mlist, self._pckdict) View it on GitLab: https://gitlab.com/mailman/mailman/commit/fd4dd866b540051782c878e7bb115cc5fa4abaa7
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org