diff options
| author | Barry Warsaw | 2015-03-13 20:56:51 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-03-13 20:56:51 -0400 |
| commit | a77f6650bc69ce968d3ac60d1b545d9bbdb9c62f (patch) | |
| tree | ee30bf86419ee964d081897ddc2d4e7ed0b6e976 /src | |
| parent | d7e96af25e7ae428cf07d9170a4cb01c9022eae2 (diff) | |
| parent | 8d9b19d5f5a5f78d28cb4e04d92a91e746ed7102 (diff) | |
| download | mailman-a77f6650bc69ce968d3ac60d1b545d9bbdb9c62f.tar.gz mailman-a77f6650bc69ce968d3ac60d1b545d9bbdb9c62f.tar.zst mailman-a77f6650bc69ce968d3ac60d1b545d9bbdb9c62f.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/bin/docs/master.rst | 8 | ||||
| -rw-r--r-- | src/mailman/bin/mailman.py | 2 | ||||
| -rw-r--r-- | src/mailman/bin/master.py | 2 | ||||
| -rw-r--r-- | src/mailman/bin/runner.py | 21 | ||||
| -rw-r--r-- | src/mailman/commands/cli_inject.py | 2 | ||||
| -rw-r--r-- | src/mailman/commands/cli_status.py | 2 | ||||
| -rw-r--r-- | src/mailman/commands/cli_withlist.py | 10 | ||||
| -rw-r--r-- | src/mailman/commands/docs/aliases.rst | 2 | ||||
| -rw-r--r-- | src/mailman/commands/docs/conf.rst | 6 | ||||
| -rw-r--r-- | src/mailman/commands/docs/members.rst | 4 | ||||
| -rw-r--r-- | src/mailman/commands/tests/test_create.py | 4 | ||||
| -rw-r--r-- | src/mailman/config/config.py | 8 | ||||
| -rw-r--r-- | src/mailman/config/schema.cfg | 10 | ||||
| -rw-r--r-- | src/mailman/core/logging.py | 4 | ||||
| -rw-r--r-- | src/mailman/docs/8-miles-high.rst | 6 | ||||
| -rw-r--r-- | src/mailman/docs/DEVELOP.rst | 4 | ||||
| -rw-r--r-- | src/mailman/docs/MTA.rst | 2 | ||||
| -rw-r--r-- | src/mailman/docs/START.rst | 13 |
18 files changed, 53 insertions, 57 deletions
diff --git a/src/mailman/bin/docs/master.rst b/src/mailman/bin/docs/master.rst index 3d10b69ac..5a3a94da6 100644 --- a/src/mailman/bin/docs/master.rst +++ b/src/mailman/bin/docs/master.rst @@ -4,10 +4,10 @@ Mailman runner control Mailman has a number of *runner subprocesses* which perform long-running tasks such as listening on an LMTP port, processing REST API requests, or processing -messages in a queue directory. In normal operation, the ``bin/mailman`` -command is used to start, stop and manage the runners. This is just a wrapper -around the real master watcher, which handles runner starting, stopping, -exiting, and log file reopening. +messages in a queue directory. In normal operation, the ``mailman`` command +is used to start, stop and manage the runners. This is just a wrapper around +the real master watcher, which handles runner starting, stopping, exiting, and +log file reopening. >>> from mailman.testing.helpers import TestableMaster diff --git a/src/mailman/bin/mailman.py b/src/mailman/bin/mailman.py index 8814cdfc4..3865fef19 100644 --- a/src/mailman/bin/mailman.py +++ b/src/mailman/bin/mailman.py @@ -36,7 +36,7 @@ from zope.interface.verify import verifyObject def main(): - """bin/mailman""" + """The `mailman` command dispatcher.""" # Create the basic parser and add all globally common options. parser = argparse.ArgumentParser( description=_("""\ diff --git a/src/mailman/bin/master.py b/src/mailman/bin/master.py index 492a6b138..5ffe59647 100644 --- a/src/mailman/bin/master.py +++ b/src/mailman/bin/master.py @@ -320,7 +320,7 @@ class Loop: log.info('Master watcher caught SIGUSR1. Exiting.') signal.signal(signal.SIGUSR1, sigusr1_handler) # SIGTERM is what init will kill this process with when changing run - # levels. It's also the signal 'bin/mailman stop' uses. + # levels. It's also the signal 'mailman stop' uses. def sigterm_handler(signum, frame): for pid in self._kids: os.kill(pid, signal.SIGTERM) diff --git a/src/mailman/bin/runner.py b/src/mailman/bin/runner.py index e8c68dad9..87d11dbe9 100644 --- a/src/mailman/bin/runner.py +++ b/src/mailman/bin/runner.py @@ -108,19 +108,18 @@ def main(): description=_("""\ Start a runner - The runner named on the command line is started, and it can - either run through its main loop once (for those runners that - support this) or continuously. The latter is how the master - runner starts all its subprocesses. + The runner named on the command line is started, and it can either run + through its main loop once (for those runners that support this) or + continuously. The latter is how the master runner starts all its + subprocesses. - -r is required unless -l or -h is given, and its argument must - be one of the names displayed by the -l switch. + -r is required unless -l or -h is given, and its argument must be one + of the names displayed by the -l switch. - Normally, this script should be started from 'bin/mailman - start'. Running it separately or with -o is generally useful - only for debugging. When run this way, the environment variable - $MAILMAN_UNDER_MASTER_CONTROL will be set which subtly changes - some error handling behavior. + Normally, this script should be started from 'mailman start'. Running + it separately or with -o is generally useful only for debugging. When + run this way, the environment variable $MAILMAN_UNDER_MASTER_CONTROL + will be set which subtly changes some error handling behavior. """)) parser.add_argument( '--version', diff --git a/src/mailman/commands/cli_inject.py b/src/mailman/commands/cli_inject.py index c467c2508..1b7f15f7b 100644 --- a/src/mailman/commands/cli_inject.py +++ b/src/mailman/commands/cli_inject.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License along with # GNU Mailman. If not, see <http://www.gnu.org/licenses/>. -"""bin/mailman inject""" +"""The `mailman inject` subcommand.""" __all__ = [ 'Inject', diff --git a/src/mailman/commands/cli_status.py b/src/mailman/commands/cli_status.py index 34420954b..7faab7941 100644 --- a/src/mailman/commands/cli_status.py +++ b/src/mailman/commands/cli_status.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License along with # GNU Mailman. If not, see <http://www.gnu.org/licenses/>. -"""bin/mailman status.""" +"""The `mailman status` subcommand.""" __all__ = [ 'Status', diff --git a/src/mailman/commands/cli_withlist.py b/src/mailman/commands/cli_withlist.py index c0c9b3202..e3307d7b4 100644 --- a/src/mailman/commands/cli_withlist.py +++ b/src/mailman/commands/cli_withlist.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License along with # GNU Mailman. If not, see <http://www.gnu.org/licenses/>. -"""bin/mailman withlist""" +"""The `mailman shell` subcommand.""" __all__ = [ 'Shell', @@ -190,7 +190,7 @@ Programmatically, you can write a function to operate on a mailing list, and this script will take care of the housekeeping (see below for examples). In that case, the general usage syntax is: - % bin/mailman withlist [options] listname [args ...]""")) + % mailman withlist [options] listname [args ...]""")) print() print(_("""\ Here's an example of how to use the --run option. Say you have a file in the @@ -207,7 +207,7 @@ functions: You can print the list's posting address by running the following from the command line: - % bin/mailman withlist -r listaddr mylist@example.com + % mailman withlist -r listaddr mylist@example.com Importing listaddr ... Running listaddr.listaddr() ... mylist@example.com""")) @@ -215,7 +215,7 @@ command line: print(_("""\ And you can print the list's request address by running: - % bin/mailman withlist -r listaddr.requestaddr mylist + % mailman withlist -r listaddr.requestaddr mylist Importing listaddr ... Running listaddr.requestaddr() ... mylist-request@example.com""")) @@ -232,7 +232,7 @@ mailing list. You could put the following function in a file called and run this from the command line: - % bin/mailman withlist -r change mylist@example.com 'My List'""")) + % mailman withlist -r change mylist@example.com 'My List'""")) diff --git a/src/mailman/commands/docs/aliases.rst b/src/mailman/commands/docs/aliases.rst index 528a77770..75a9d3c11 100644 --- a/src/mailman/commands/docs/aliases.rst +++ b/src/mailman/commands/docs/aliases.rst @@ -6,7 +6,7 @@ For some mail servers, Mailman must generate data files that are used to hook Mailman up to the mail server. The details of this differ for each mail server. Generally these files are automatically kept up-to-date when mailing lists are created or removed, but you might occasionally need to manually -regenerate the file. The ``bin/mailman aliases`` command does this. +regenerate the file. The ``mailman aliases`` command does this. >>> class FakeArgs: ... directory = None diff --git a/src/mailman/commands/docs/conf.rst b/src/mailman/commands/docs/conf.rst index 0ff5064bb..1db85918f 100644 --- a/src/mailman/commands/docs/conf.rst +++ b/src/mailman/commands/docs/conf.rst @@ -2,13 +2,13 @@ Display configuration values ============================ -Just like the `Postfix command postconf(1)`_, the ``bin/mailman conf`` command +Just like the `Postfix command postconf(1)`_, the ``mailman conf`` command lets you dump one or more Mailman configuration variables to standard output or a file. Mailman's configuration is divided in multiple sections which contain multiple -key-value pairs. The ``bin/mailman conf`` command allows you to display -a specific key-value pair, or several key-value pairs. +key-value pairs. The ``mailman conf`` command allows you to display a +specific key-value pair, or several key-value pairs. >>> class FakeArgs: ... key = None diff --git a/src/mailman/commands/docs/members.rst b/src/mailman/commands/docs/members.rst index 490287235..c90418181 100644 --- a/src/mailman/commands/docs/members.rst +++ b/src/mailman/commands/docs/members.rst @@ -2,8 +2,8 @@ Managing members ================ -The ``bin/mailman members`` command allows a site administrator to display, -add, and remove members from a mailing list. +The ``mailman members`` command allows a site administrator to display, add, +and remove members from a mailing list. :: >>> mlist1 = create_list('test1@example.com') diff --git a/src/mailman/commands/tests/test_create.py b/src/mailman/commands/tests/test_create.py index d9e90df26..d7e17e5d2 100644 --- a/src/mailman/commands/tests/test_create.py +++ b/src/mailman/commands/tests/test_create.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License along with # GNU Mailman. If not, see <http://www.gnu.org/licenses/>. -"""Test `bin/mailman create`.""" +"""Test the `mailman create` subcommand.""" __all__ = [ 'TestCreate', @@ -51,8 +51,6 @@ class FakeParser: class TestCreate(unittest.TestCase): - """Test `bin/mailman create`.""" - layer = ConfigLayer def setUp(self): diff --git a/src/mailman/config/config.py b/src/mailman/config/config.py index 2b14419a2..d23bdda13 100644 --- a/src/mailman/config/config.py +++ b/src/mailman/config/config.py @@ -149,10 +149,10 @@ class Configuration: # First, collect all variables in a substitution dictionary. $VAR_DIR # is taken from the environment or from the configuration file if the # environment is not set. Because the var_dir setting in the config - # file could be a relative path, and because 'bin/mailman start' - # chdirs to $VAR_DIR, without this subprocesses bin/master and - # bin/runner will create $VAR_DIR hierarchies under $VAR_DIR when that - # path is relative. + # file could be a relative path, and because 'mailman start' chdirs to + # $VAR_DIR, without this subprocesses bin/master and bin/runner will + # create $VAR_DIR hierarchies under $VAR_DIR when that path is + # relative. var_dir = os.environ.get('MAILMAN_VAR_DIR', category.var_dir) substitutions = dict( cwd = os.getcwd(), diff --git a/src/mailman/config/schema.cfg b/src/mailman/config/schema.cfg index 61b65fac4..f8c3a117e 100644 --- a/src/mailman/config/schema.cfg +++ b/src/mailman/config/schema.cfg @@ -66,10 +66,10 @@ filtered_messages_are_preservable: no [shell] -# `bin/mailman shell` (also `withlist`) gives you an interactive prompt that -# you can use to interact with an initialized and configured Mailman system. -# Use --help for more information. This section allows you to configure -# certain aspects of this interactive shell. +# `mailman shell` (also `withlist`) gives you an interactive prompt that you +# can use to interact with an initialized and configured Mailman system. Use +# --help for more information. This section allows you to configure certain +# aspects of this interactive shell. # Customize the interpreter prompt. prompt: >>> @@ -100,7 +100,7 @@ var_dir: /var/tmp/mailman queue_dir: $var_dir/queue # This is the directory containing the Mailman 'runner' and 'master' commands # if set to the string '$argv', it will be taken as the directory containing -# the 'bin/mailman' command. +# the 'mailman' command. bin_dir: $argv # All list-specific data. list_data_dir: $var_dir/lists diff --git a/src/mailman/core/logging.py b/src/mailman/core/logging.py index c1db8a55e..7c80037f6 100644 --- a/src/mailman/core/logging.py +++ b/src/mailman/core/logging.py @@ -103,8 +103,8 @@ def _init_logger(propagate, sub_name, log, logger_config): # Get settings from log configuration file (or defaults). log_format = logger_config.format log_datefmt = logger_config.datefmt - # Propagation to the root logger is how we handle logging to stderr - # when the runners are not run as a subprocess of 'bin/mailman start'. + # Propagation to the root logger is how we handle logging to stderr when + # the runners are not run as a subprocess of 'mailman start'. log.propagate = (as_boolean(logger_config.propagate) if propagate is None else propagate) # Set the logger's level. diff --git a/src/mailman/docs/8-miles-high.rst b/src/mailman/docs/8-miles-high.rst index 85b186fc5..ae3074e1c 100644 --- a/src/mailman/docs/8-miles-high.rst +++ b/src/mailman/docs/8-miles-high.rst @@ -162,9 +162,9 @@ when the Mailman daemon starts, and what queue the Runner manages. Shell Commands ============== -`bin/mailman`: This is an ubercommand, with subcommands for all the various -things admins might want to do, similar to Mailman 2's mailmanctl, but with -more functionality. +`mailman`: This is an ubercommand, with subcommands for all the various things +admins might want to do, similar to Mailman 2's mailmanctl, but with more +functionality. `bin/master`: The runner manager: starts, watches, stops the runner daemons. diff --git a/src/mailman/docs/DEVELOP.rst b/src/mailman/docs/DEVELOP.rst index f1225658e..5b3ee602a 100644 --- a/src/mailman/docs/DEVELOP.rst +++ b/src/mailman/docs/DEVELOP.rst @@ -72,10 +72,10 @@ queue. You can think of these as fairly typical server process, and examples include the LMTP server, and the HTTP server for processing REST commands. All of the runners are managed by a *master watcher* process. When you type -``bin/mailman start`` you are actually starting the master. Based on +``mailman start`` you are actually starting the master. Based on configuration options, the master will start the appropriate runners as subprocesses, and it will watch for the clean exiting of these subprocesses -when ``bin/mailman stop`` is called. +when ``mailman stop`` is called. Rules and chains diff --git a/src/mailman/docs/MTA.rst b/src/mailman/docs/MTA.rst index 1bc9c6c13..a10c8f3cf 100644 --- a/src/mailman/docs/MTA.rst +++ b/src/mailman/docs/MTA.rst @@ -143,7 +143,7 @@ Transport maps By default, Mailman works well with Postfix transport maps as a way to deliver incoming messages to Mailman's LMTP server. Mailman will automatically write -the correct transport map when its ``bin/mailman aliases`` command is run, or +the correct transport map when its ``mailman aliases`` command is run, or whenever a mailing list is created or removed via other commands. To connect Postfix to Mailman's LMTP server, add the following to Postfix's ``main.cf`` file:: diff --git a/src/mailman/docs/START.rst b/src/mailman/docs/START.rst index ae4fe43a5..3ca4460b4 100644 --- a/src/mailman/docs/START.rst +++ b/src/mailman/docs/START.rst @@ -188,14 +188,13 @@ The first existing file found wins. * ``/etc/mailman.cfg`` * ``argv[0]/../../etc/mailman.cfg`` -Run the ``bin/mailman info`` command to see which configuration file Mailman -will use, and where it will put its database file. The first time you run -this, Mailman will also create any necessary run-time directories and log -files. +Run the ``mailman info`` command to see which configuration file Mailman will +use, and where it will put its database file. The first time you run this, +Mailman will also create any necessary run-time directories and log files. -Try ``bin/mailman --help`` for more details. You can use the commands -``bin/mailman start`` to start the runner subprocess daemons, and of course -``bin/mailman stop`` to stop them. +Try ``mailman --help`` for more details. You can use the commands +``mailman start`` to start the runner subprocess daemons, and of course +``mailman stop`` to stop them. Postorius, a web UI for administration and subscriber settings, is being developed as a separate, Django-based project. For now, the most flexible |
