diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/commands/cli_lists.py | 2 | ||||
| -rw-r--r-- | src/mailman/commands/docs/create.txt | 93 | ||||
| -rw-r--r-- | src/mailman/templates/en/newlist.txt | 33 |
3 files changed, 100 insertions, 28 deletions
diff --git a/src/mailman/commands/cli_lists.py b/src/mailman/commands/cli_lists.py index 9d6c1a406..25e39cc49 100644 --- a/src/mailman/commands/cli_lists.py +++ b/src/mailman/commands/cli_lists.py @@ -212,7 +212,7 @@ class Create: # the old translation context is just (healthy? :) paranoia. with using_language(mlist.preferred_language.code): msg = UserNotification( - owner_mail, mlist.no_reply_address, + args.owners, mlist.no_reply_address, _('Your new mailing list: $fqdn_listname'), text, mlist.preferred_language) msg.send(mlist) 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. diff --git a/src/mailman/templates/en/newlist.txt b/src/mailman/templates/en/newlist.txt index 3362887d8..f7b164eb4 100644 --- a/src/mailman/templates/en/newlist.txt +++ b/src/mailman/templates/en/newlist.txt @@ -1,35 +1,18 @@ -The mailing list `%(listname)s' has just been created for you. The +The mailing list '$listname' has just been created for you. The following is some basic information about your mailing list. -Your mailing list password is: - - %(password)s - -You need this password to configure your mailing list. You also need -it to handle administrative requests, such as approving mail if you -choose to run a moderated list. - You can configure your mailing list at the following web page: - %(admin_url)s + $admin_url The web page for users of your mailing list is: - %(listinfo_url)s - -You can even customize these web pages from the list configuration -page. However, you do need to know HTML to be able to do this. - -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: + $listinfo_url - %(requestaddr)s +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: -To unsubscribe a user: from the mailing list 'listinfo' web page, -click on or enter the user's email address as if you were that user. -Where that user would put in their password to unsubscribe, put in -your admin password. You can also use your password to change -member's options, including digestification, delivery disabling, etc. + $requestaddr -Please address all questions to %(siteowner)s. +Please address all questions to $siteowner. |
