From f7cbf566f32ac9819a6fc68652aee056cb7682a1 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sun, 6 Dec 2009 12:17:02 -0500 Subject: * Fix a test based on updated output. * Add a stub for the -confirm email command * Add stubs for -leave and -unsubscribe * Remove the crufty (and broken) 'tojoin' 'toleave' and 'toconfirm' metadata keys for synchronizing between lmtp and the command runner. Replace this by putting the subaddress recognized by lmtp into the metadata and having the command runner look at the subaddress. --- src/mailman/commands/eml_join.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/mailman/commands/eml_join.py') diff --git a/src/mailman/commands/eml_join.py b/src/mailman/commands/eml_join.py index f29684b93..4e3f6edb9 100644 --- a/src/mailman/commands/eml_join.py +++ b/src/mailman/commands/eml_join.py @@ -17,10 +17,14 @@ """The email commands 'join' and 'subscribe'.""" +from __future__ import absolute_import, unicode_literals + __metaclass__ = type __all__ = [ 'Join', 'Subscribe', + 'Leave', + 'Unsubscribe', ] @@ -38,6 +42,7 @@ from mailman.interfaces.registrar import IRegistrar class Join: """The email 'join' command.""" + implements(IEmailCommand) name = 'join' @@ -125,3 +130,26 @@ class Subscribe(Join): """The email 'subscribe' command (an alias for 'join').""" name = 'subscribe' + + + +class Leave: + """The email 'leave' command.""" + + implements(IEmailCommand) + + name = 'leave' + argument_description = '' + description = '' + + def process(self, mlist, msg, msgdata, arguments, results): + """See `IEmailCommand`.""" + person = msg['from'] + print >> results, _('$person left $mlist.fqdn_listname') + return ContinueProcessing.yes + + +class Unsubscribe(Leave): + """The email 'unsubscribe' command (an alias for 'leave').""" + + name = 'unsubscribe' -- cgit v1.2.3-70-g09d2