diff options
| author | Barry Warsaw | 2009-12-06 12:17:02 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-12-06 12:17:02 -0500 |
| commit | f7cbf566f32ac9819a6fc68652aee056cb7682a1 (patch) | |
| tree | fc6df72b0f6bd43debc20f0db11389a8ef14bc37 /src/mailman/commands/eml_join.py | |
| parent | af33fabf7e10cb42ab6802b8a222670b2b7037f0 (diff) | |
| download | mailman-f7cbf566f32ac9819a6fc68652aee056cb7682a1.tar.gz mailman-f7cbf566f32ac9819a6fc68652aee056cb7682a1.tar.zst mailman-f7cbf566f32ac9819a6fc68652aee056cb7682a1.zip | |
* 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.
Diffstat (limited to 'src/mailman/commands/eml_join.py')
| -rw-r--r-- | src/mailman/commands/eml_join.py | 28 |
1 files changed, 28 insertions, 0 deletions
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' |
