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/queue/docs/command.txt | |
| 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/queue/docs/command.txt')
| -rw-r--r-- | src/mailman/queue/docs/command.txt | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/src/mailman/queue/docs/command.txt b/src/mailman/queue/docs/command.txt index 88e4387d4..fd0236a8c 100644 --- a/src/mailman/queue/docs/command.txt +++ b/src/mailman/queue/docs/command.txt @@ -108,6 +108,105 @@ message is plain text. <BLANKLINE> +Implicit commands +================= + +For some commands, specifically for joining and leaving a mailing list, there +are email aliases that act like commands, even when there's nothing else in +the Subject or body. For example, to join a mailing list, a user need only +email the -join address or -subscribe address (the latter is deprecated). + +Because Dirk has never registered with Mailman before, he gets two responses. +The first is a confirmation message so that Dirk can validate his email +address, and the other is the results of his email command. + + >>> msg = message_from_string("""\ + ... From: Dirk Person <dperson@example.com> + ... To: test-join@example.com + ... + ... """) + + >>> inject_message(mlist, msg, switchboard='command', subaddress='join') + >>> command.run() + >>> len(virgin_queue.files) + 2 + + >>> def sortkey(item): + ... return item.msg['subject'] + >>> messages = sorted(get_queue_messages('virgin'), key=sortkey) + >>> for item in messages: + ... print 'Subject:', item.msg['subject'] + Subject: confirm ... + Subject: The results of your email commands + +Similarly, to leave a mailing list, the user need only email the -leave or +-unsubscribe address (the latter is deprecated). + + >>> msg = message_from_string("""\ + ... From: dperson@example.com + ... To: test-leave@example.com + ... + ... """) + + >>> inject_message(mlist, msg, switchboard='command', subaddress='leave') + >>> command.run() + >>> len(virgin_queue.files) + 1 + >>> item = get_queue_messages('virgin')[0] + >>> print item.msg.as_string() + Subject: The results of your email commands + From: test-bounces@example.com + To: dperson@example.com + ... + <BLANKLINE> + The results of your email command are provided below. + <BLANKLINE> + - Original message details: + From: dperson@example.com + Subject: n/a + Date: ... + Message-ID: ... + <BLANKLINE> + - Results: + dperson@example.com left test@example.com + <BLANKLINE> + - Done. + <BLANKLINE> + +The -confirm address is also available as an implicit command. + + >>> msg = message_from_string("""\ + ... From: dperson@example.com + ... To: test-confirm+123@example.com + ... + ... """) + + >>> inject_message(mlist, msg, switchboard='command', subaddress='confirm') + >>> command.run() + >>> len(virgin_queue.files) + 1 + >>> item = get_queue_messages('virgin')[0] + >>> print item.msg.as_string() + Subject: The results of your email commands + From: test-bounces@example.com + To: dperson@example.com + ... + <BLANKLINE> + The results of your email command are provided below. + <BLANKLINE> + - Original message details: + From: dperson@example.com + Subject: n/a + Date: ... + Message-ID: ... + <BLANKLINE> + - Results: + Confirmed + <BLANKLINE> + - Done. + <BLANKLINE> + + Stopping command processing =========================== |
