blob: f13d8cacd3263cd46cf44d67abd76e44b1e8493d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
=========================
Command line list removal
=========================
A system administrator can remove mailing lists by the command line.
::
>>> create_list('ant@example.com')
<mailing list "ant@example.com" at ...>
>>> command = cli('mailman.commands.cli_lists.remove')
>>> command('mailman remove ant@example.com')
Removed list: ant@example.com
>>> from mailman.interfaces.listmanager import IListManager
>>> from zope.component import getUtility
>>> list_manager = getUtility(IListManager)
>>> print(list_manager.get('ant@example.com'))
None
You can also remove lists quietly.
::
>>> create_list('ant@example.com')
<mailing list "ant@example.com" at ...>
>>> command('mailman remove ant@example.com --quiet')
>>> print(list_manager.get('ant@example.com'))
None
|