summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarry Warsaw2016-09-16 22:35:10 +1200
committerBarry Warsaw2016-09-16 22:35:10 +1200
commit3ba58c6fb843d91f731c34310fcb67f2273e7078 (patch)
treea268f8f0a2fee1b7a7411e7cbcdcc1bb4a0cff69 /src
parent511c86916b0e6dea315249a4c44ee3b3503e61c2 (diff)
downloadmailman-3ba58c6fb843d91f731c34310fcb67f2273e7078.tar.gz
mailman-3ba58c6fb843d91f731c34310fcb67f2273e7078.tar.zst
mailman-3ba58c6fb843d91f731c34310fcb67f2273e7078.zip
Diffstat (limited to 'src')
-rw-r--r--src/mailman/commands/eml_membership.py9
1 files changed, 5 insertions, 4 deletions
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.