From 3ba58c6fb843d91f731c34310fcb67f2273e7078 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 16 Sep 2016 22:35:10 +1200 Subject: Another fix. --- src/mailman/commands/eml_membership.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mailman/commands/eml_membership.py b/src/mailman/commands/eml_membership.py index 9194ebe21..2c535a9d5 100644 --- a/src/mailman/commands/eml_membership.py +++ b/src/mailman/commands/eml_membership.py @@ -174,6 +174,7 @@ You may be asked to confirm your request.""") print(_('Invalid or unverified email address: $email'), file=results) return ContinueProcessing.no + already_left = msgdata.setdefault('leaves', set()) for user_address in user.addresses: # Only recognize verified addresses. if user_address.verified_on is None: @@ -188,10 +189,10 @@ You may be asked to confirm your request.""") # E.g. if a message was sent to the -leave address and it # contained the 'leave' command. Don't send a bogus response in # this case, just ignore subsequent leaves of the same address. - print(_('$self.name: $email is not a member of ' - '$mlist.fqdn_listname'), file=results) - return ContinueProcessing.no - already_left = msgdata.setdefault('leaves', set()) + if email not in already_left: + print(_('$self.name: $email is not a member of ' + '$mlist.fqdn_listname'), file=results) + return ContinueProcessing.no if email in already_left: return ContinueProcessing.yes # Ignore any subsequent 'leave' commands. -- cgit v1.2.3-70-g09d2