Mark Sapiro pushed to branch master at GNU Mailman / Mailman Core
Commits:
8f1a7d58 by Mark Sapiro at 2019-06-23T23:58:01Z
Add an Auto-Submitted: header to (un)subscribe confirmation requests.
- - - - -
441634d9 by Mark Sapiro at 2019-06-23T23:58:01Z
Merge branch 'fix_23' into 'master'
Add an Auto-Submitted: header to (un)subscribe confirmation requests.
Closes #23
See merge request mailman/mailman!530
- - - - -
4 changed files:
- src/mailman/app/subscriptions.py
- src/mailman/app/tests/test_subscriptions.py
- src/mailman/app/tests/test_unsubscriptions.py
- src/mailman/docs/NEWS.rst
Changes:
=====================================
src/mailman/app/subscriptions.py
=====================================
@@ -579,6 +579,8 @@ def _handle_confirmation_needed_events(event,
template_name):
msg = UserNotification(
email_address, confirm_address, subject, text,
event.mlist.preferred_language)
+ del msg['auto-submitted']
+ msg['Auto-Submitted'] = 'auto-generated'
msg.send(event.mlist, add_precedence=False)
=====================================
src/mailman/app/tests/test_subscriptions.py
=====================================
@@ -508,6 +508,8 @@ approval:
message['From'], 'test-confirm+{}@example.com'.format(token))
# The confirmation message is not `Precedence: bulk`.
self.assertIsNone(message['precedence'])
+ # The confirmation message is `Auto-Submitted: auto-generated`.
+ self.assertEqual(message['auto-submitted'], 'auto-generated')
# The state machine stopped at the moderator approval so there will be
# one token still in the database.
self._expected_pendings_count = 1
=====================================
src/mailman/app/tests/test_unsubscriptions.py
=====================================
@@ -329,6 +329,10 @@ request approval:
message['Subject'], 'confirm {}'.format(workflow.token))
self.assertEqual(
message['From'], 'test-confirm+{}@example.com'.format(token))
+ # The confirmation message is not `Precedence: bulk`.
+ self.assertIsNone(message['precedence'])
+ # The confirmation message is `Auto-Submitted: auto-generated`.
+ self.assertEqual(message['auto-submitted'], 'auto-generated')
# The state machine stopped at the member confirmation step so there
# will be one token still in the database.
self._expected_pendings_count = 1
=====================================
src/mailman/docs/NEWS.rst
=====================================
@@ -72,6 +72,8 @@ Other
* Add support for SMPTS/STARTTLS for connections to MTA. (See !508)
* The last remnants of the mailing list attribute ``nntp_host`` have been
removed. (Closes #611)
+* Email confirmation requests now include an ``Auto-Submitted`` header to
+ prevent robotic replies per ``RFC 3834``. (Closes #23)
3.2.2
=====
View it on GitLab:
https://gitlab.com/mailman/mailman/compare/f3b2e4a536e0fe01db5e586af018232677e40e64...441634d92e46bd610abe61e4a9ac3c089e8305ab
--
View it on GitLab:
https://gitlab.com/mailman/mailman/compare/f3b2e4a536e0fe01db5e586af018232677e40e64...441634d92e46bd610abe61e4a9ac3c089e8305ab
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