Command line list removal

A system administrator can remove mailing lists by the command line.

>>> create_list('[email protected]')
<mailing list "[email protected]" at ...>

>>> command = cli('mailman.commands.cli_lists.remove')
>>> command('mailman remove [email protected]')
Removed list: [email protected]

>>> from mailman.interfaces.listmanager import IListManager
>>> from zope.component import getUtility
>>> list_manager = getUtility(IListManager)
>>> print(list_manager.get('[email protected]'))
None

You can also remove lists quietly.

>>> create_list('[email protected]')
<mailing list "[email protected]" at ...>

>>> command('mailman remove [email protected] --quiet')

>>> print(list_manager.get('[email protected]'))
None