summaryrefslogtreecommitdiff
path: root/src/mailman/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/commands')
-rw-r--r--src/mailman/commands/cli_lists.py18
-rw-r--r--src/mailman/commands/docs/create.rst16
-rw-r--r--src/mailman/commands/docs/info.rst1
-rw-r--r--src/mailman/commands/tests/test_lists.py3
4 files changed, 15 insertions, 23 deletions
diff --git a/src/mailman/commands/cli_lists.py b/src/mailman/commands/cli_lists.py
index 352accab2..9813da29c 100644
--- a/src/mailman/commands/cli_lists.py
+++ b/src/mailman/commands/cli_lists.py
@@ -30,7 +30,8 @@ from mailman.interfaces.domain import (
BadDomainSpecificationError, IDomainManager)
from mailman.interfaces.languages import ILanguageManager
from mailman.interfaces.listmanager import IListManager, ListAlreadyExistsError
-from mailman.utilities.i18n import make
+from mailman.interfaces.template import ITemplateLoader
+from mailman.utilities.string import expand, wrap
from zope.component import getUtility
from zope.interface import implementer
@@ -221,14 +222,13 @@ class Create:
if not args.quiet:
print(_('Created mailing list: $mlist.fqdn_listname'))
if args.notify:
- d = dict(
- listname = mlist.fqdn_listname, # noqa
- admin_url = mlist.script_url('admin'), # noqa
- listinfo_url = mlist.script_url('listinfo'), # noqa
- requestaddr = mlist.request_address, # noqa
- siteowner = mlist.no_reply_address, # noqa
- )
- text = make('newlist.txt', mailing_list=mlist, **d)
+ template = getUtility(ITemplateLoader).get(
+ 'domain:admin:notice:new-list', mlist)
+ text = wrap(expand(template, mlist, dict(
+ # For backward compatibility.
+ requestaddr=mlist.request_address,
+ siteowner=mlist.no_reply_address,
+ )))
# Set the I18N language to the list's preferred language so the
# header will match the template language. Stashing and restoring
# the old translation context is just (healthy? :) paranoia.
diff --git a/src/mailman/commands/docs/create.rst b/src/mailman/commands/docs/create.rst
index 701a51a08..12e3a1c95 100644
--- a/src/mailman/commands/docs/create.rst
+++ b/src/mailman/commands/docs/create.rst
@@ -44,7 +44,7 @@ Now both the domain and the mailing list exist in the database.
>>> from mailman.interfaces.domain import IDomainManager
>>> getUtility(IDomainManager).get('example.xx')
- <Domain example.xx, base_url: http://example.xx>
+ <Domain example.xx>
You can prevent the creation of the domain in existing domains by using the
``-D`` or ``--no-domain`` flag. Although the ``--no-domain`` flag is not
@@ -169,17 +169,9 @@ The notification message is in the virgin queue.
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:
+ There is 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>
diff --git a/src/mailman/commands/docs/info.rst b/src/mailman/commands/docs/info.rst
index 407b9eacc..5cea9ee2c 100644
--- a/src/mailman/commands/docs/info.rst
+++ b/src/mailman/commands/docs/info.rst
@@ -64,6 +64,7 @@ definition.
File system paths:
ARCHIVE_DIR = /var/lib/mailman/archives
BIN_DIR = /sbin
+ CACHE_DIR = /var/lib/mailman/cache
CFG_FILE = .../test.cfg
DATA_DIR = /var/lib/mailman/data
ETC_DIR = /etc
diff --git a/src/mailman/commands/tests/test_lists.py b/src/mailman/commands/tests/test_lists.py
index 392e3f36e..4d0b0e14a 100644
--- a/src/mailman/commands/tests/test_lists.py
+++ b/src/mailman/commands/tests/test_lists.py
@@ -42,8 +42,7 @@ class TestLists(unittest.TestCase):
def test_lists_with_domain_option(self):
# LP: #1166911 - non-matching lists were returned.
getUtility(IDomainManager).add(
- 'example.net', 'An example domain.',
- 'http://lists.example.net')
+ 'example.net', 'An example domain.')
create_list('test1@example.com')
create_list('test2@example.com')
# Only this one should show up.