diff options
| author | Barry Warsaw | 2009-08-12 23:53:34 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2009-08-12 23:53:34 -0400 |
| commit | e8044c07e50ecceaf6fc22e2f0d2a14b506af7b1 (patch) | |
| tree | 66aacfe99b6c15c10a484b95fbffd6a3f20373c1 /src/mailman/commands/docs | |
| parent | 129dc2580ff5d0def7b5e5fcf95af53c7f9685de (diff) | |
| download | mailman-e8044c07e50ecceaf6fc22e2f0d2a14b506af7b1.tar.gz mailman-e8044c07e50ecceaf6fc22e2f0d2a14b506af7b1.tar.zst mailman-e8044c07e50ecceaf6fc22e2f0d2a14b506af7b1.zip | |
Tests for setting an owner and the language. A test for notifications, and
errors. Update newlist.txt.
Diffstat (limited to 'src/mailman/commands/docs')
| -rw-r--r-- | src/mailman/commands/docs/create.txt | 93 |
1 files changed, 91 insertions, 2 deletions
diff --git a/src/mailman/commands/docs/create.txt b/src/mailman/commands/docs/create.txt index 681ac074c..ec5354e5f 100644 --- a/src/mailman/commands/docs/create.txt +++ b/src/mailman/commands/docs/create.txt @@ -61,16 +61,58 @@ The command can also operate quietly. >>> args.listname = ['test2@example.com'] >>> command.process(args) - >>> config.db.list_manager.get('test2@example.com') + >>> mlist = config.db.list_manager.get('test2@example.com') + >>> mlist <mailing list "test2@example.com" at ...> +Setting the owner +================= + +By default, no list owners are specified. + + >>> print list(mlist.owners.addresses) + [] + +But you can specify an owner address on the command line when you create the +mailing list. + + >>> args.quiet = False + >>> args.listname = ['test4@example.com'] + >>> args.owners = ['foo@example.org'] + >>> command.process(args) + Created mailing list: test4@example.com + + >>> mlist = config.db.list_manager.get('test4@example.com') + >>> print list(mlist.owners.addresses) + [<Address: foo@example.org [not verified] at ...>] + +You can even specify more than one address for the owners. + + >>> args.owners = ['foo@example.net', 'bar@example.net', 'baz@example.net'] + >>> args.listname = ['test5@example.com'] + >>> command.process(args) + Created mailing list: test5@example.com + + >>> mlist = config.db.list_manager.get('test5@example.com') + >>> from operator import attrgetter + >>> print sorted(mlist.owners.addresses, key=attrgetter('address')) + [<Address: bar@example.net [not verified] at ...>, + <Address: baz@example.net [not verified] at ...>, + <Address: foo@example.net [not verified] at ...>] + + Setting the language ==================== You can set the default language for the new mailing list when you create it. The language must be known to Mailman. + >>> args.listname = ['test3@example.com'] + >>> args.language = 'it' + >>> command.process(args) + Invalid language code: it + >>> config.languages.add('it', 'iso-8859-1', 'Italian') >>> args.quiet = False @@ -85,13 +127,60 @@ The language must be known to Mailman. >>> args.language = None +Notifications +============= + +When told to, Mailman will notify the list owners of their new mailing list. + + >>> args.listname = ['test6@example.com'] + >>> args.notify = True + >>> command.process(args) + Created mailing list: test6@example.com + +The notification message is in the virgin queue. + + >>> from mailman.testing.helpers import get_queue_messages + >>> messages = get_queue_messages('virgin') + >>> len(messages) + 1 + + >>> for message in messages: + ... print message.msg.as_string() + MIME-Version: 1.0 + ... + Subject: Your new mailing list: test6@example.com + From: noreply@example.com + To: foo@example.net, bar@example.net, baz@example.net + ... + <BLANKLINE> + The mailing list 'test6@example.com' has just been created for you. + The following is some basic information about your mailing list. + <BLANKLINE> + You can configure your mailing list at the following web page: + <BLANKLINE> + http://lists.example.com/admin/test6@example.com + <BLANKLINE> + The web page for users of your mailing list is: + <BLANKLINE> + http://lists.example.com/listinfo/test6@example.com + <BLANKLINE> + There is also an email-based interface for users (not administrators) + of your list; you can get info about using it by sending a message + with just the word 'help' as subject or in the body, to: + <BLANKLINE> + test6-request@example.com + <BLANKLINE> + Please address all questions to noreply@example.com. + <BLANKLINE> + + Errors ====== You cannot create a mailing list that already exists. >>> command.process(args) - List already exists: test3@example.com + List already exists: test6@example.com The posting address of the mailing list must be valid. |
