summaryrefslogtreecommitdiff
path: root/src/mailman/commands
diff options
context:
space:
mode:
authorBarry Warsaw2012-02-29 20:02:09 -0500
committerBarry Warsaw2012-02-29 20:02:09 -0500
commit50282ed9030dc7790d24e6fa9796ff9874634e67 (patch)
treedae20346df652bfcd886cf198ad13cfd93bc769e /src/mailman/commands
parenta3337eb1c75e00cf07081cf98a4d1c6fc2478919 (diff)
downloadmailman-50282ed9030dc7790d24e6fa9796ff9874634e67.tar.gz
mailman-50282ed9030dc7790d24e6fa9796ff9874634e67.tar.zst
mailman-50282ed9030dc7790d24e6fa9796ff9874634e67.zip
Don't try to double join someone via a single email command.
Diffstat (limited to 'src/mailman/commands')
-rw-r--r--src/mailman/commands/eml_membership.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mailman/commands/eml_membership.py b/src/mailman/commands/eml_membership.py
index e68d501ee..4f46cfac7 100644
--- a/src/mailman/commands/eml_membership.py
+++ b/src/mailman/commands/eml_membership.py
@@ -73,6 +73,14 @@ example:
print >> results, _(
'$self.name: No valid address found to subscribe')
return ContinueProcessing.no
+ # Have we already seen one join request from this user during the
+ # processing of this email?
+ joins = getattr(results, 'joins', set())
+ if address in joins:
+ # Do not register this join.
+ return ContinueProcessing.yes
+ joins.add(address)
+ results.joins = joins
getUtility(IRegistrar).register(mlist, address, real_name)
person = formataddr((real_name, address))
print >> results, _('Confirmation email sent to $person')