Mark Sapiro pushed to branch master at GNU Mailman / Mailman Core
Commits: 010c9fc2 by Kunal Mehta at 2021-06-16T16:11:46-07:00 Only remove or send warnings to list members when processing bounces delete_member() expects that it is only operating on members with a role of "member", and will throw an exception if it can't find it. This mostly makes sense since we can only unsubscribe members and don't want to automatically remove list moderators/owners. This exception would bubble up, triggering a rollback and crashing the bounce runner (both separate issues). We apply the same logic to the warning notifications as well since they'll only be unsubscribed if they have a role of "member". Fixes #910. - - - - - e64f2927 by Mark Sapiro at 2021-06-19T15:43:40-07:00 Merge branch 'legoktm/mailman-query-only-member' Only remove or send warnings to list members when processing bounces Closes #910 See merge request mailman/mailman!873 - - - - - 2 changed files: - src/mailman/docs/NEWS.rst - src/mailman/model/member.py Changes: ===================================== src/mailman/docs/NEWS.rst ===================================== @@ -79,6 +79,8 @@ Bugs #854) * Exceptions in bounce processing member removal don't roll back successful removals. (Closes #909) +* Only remove or send warnings to list members when processing bounces. + (Closes #910) Command line ------------ ===================================== src/mailman/model/member.py ===================================== @@ -245,6 +245,7 @@ class MembershipManager: MailingList.bounce_you_are_disabled_warnings_interval).join( MailingList, Member.list_id == MailingList._list_id).join( Member.preferences).filter(and_( + Member.role == MemberRole.member, MailingList.process_bounces == True, # noqa: E712 Member.total_warnings_sent < MailingList.bounce_you_are_disabled_warnings, # noqa: E501 Preferences.delivery_status == DeliveryStatus.by_bounces)) @@ -277,6 +278,7 @@ class MembershipManager: MailingList.bounce_you_are_disabled_warnings).join( MailingList, Member.list_id == MailingList._list_id).join( Member.preferences).filter(and_( + Member.role == MemberRole.member, MailingList.process_bounces == True, # noqa: E712 Member.total_warnings_sent >= MailingList.bounce_you_are_disabled_warnings, # noqa: E501 Preferences.delivery_status == DeliveryStatus.by_bounces)) View it on GitLab: https://gitlab.com/mailman/mailman/-/compare/17d8abd5afddd97540a73223fc875a5b0093f147...e64f2927e28b0676621b1d5eef9cb99f18020dff -- View it on GitLab: https://gitlab.com/mailman/mailman/-/compare/17d8abd5afddd97540a73223fc875a5b0093f147...e64f2927e28b0676621b1d5eef9cb99f18020dff 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