summaryrefslogtreecommitdiff
path: root/src/mailman/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/config')
-rw-r--r--src/mailman/config/config.py10
-rw-r--r--src/mailman/config/schema.cfg51
2 files changed, 45 insertions, 16 deletions
diff --git a/src/mailman/config/config.py b/src/mailman/config/config.py
index 4a4eadff5..95e593fb8 100644
--- a/src/mailman/config/config.py
+++ b/src/mailman/config/config.py
@@ -76,6 +76,7 @@ class Configuration:
self.handlers = {}
self.pipelines = {}
self.commands = {}
+ self.plugins = {}
self.workflows = {}
self.password_context = None
self.db = None
@@ -159,7 +160,7 @@ class Configuration:
else category.template_dir),
)
# Directories.
- for name in ('archive', 'bin', 'cache', 'data', 'etc', 'ext',
+ for name in ('archive', 'bin', 'cache', 'data', 'etc',
'list_data', 'lock', 'log', 'messages', 'queue'):
key = '{}_dir'.format(name)
substitutions[key] = getattr(category, key)
@@ -249,6 +250,13 @@ class Configuration:
yield archiver
@property
+ def plugin_configs(self):
+ """Return all the plugin configuration sections."""
+ plugin_sections = self._config.getByCategory('plugin', [])
+ for section in plugin_sections:
+ yield section.category_and_section_names[1], section
+
+ @property
def language_configs(self):
"""Iterate over all the language configuration sections."""
yield from self._config.getByCategory('language', [])
diff --git a/src/mailman/config/schema.cfg b/src/mailman/config/schema.cfg
index 9568694be..742bceae1 100644
--- a/src/mailman/config/schema.cfg
+++ b/src/mailman/config/schema.cfg
@@ -54,14 +54,6 @@ pending_request_life: 3d
# How long should files be saved before they are evicted from the cache?
cache_life: 7d
-# A callable to run with no arguments early in the initialization process.
-# This runs before database initialization.
-pre_hook:
-
-# A callable to run with no arguments late in the initialization process.
-# This runs after adapters are initialized.
-post_hook:
-
# Which paths.* file system layout to use.
layout: here
@@ -82,6 +74,38 @@ html_to_plain_text_command: /usr/bin/lynx -dump $filename
# unpredictable.
listname_chars: [-_.0-9a-z]
+# Deprecated, callable run before DB initialization.
+pre_hook:
+
+# Deprecated, callable run after DB initialization.
+post_hook:
+
+
+[plugin.master]
+# Plugin package
+# It's sub packages will be searched for components.
+# - commands for IEmailCommand and ICliSubCommand
+# - chains for IChain
+# - rules for IRule
+# - pipelines for IPipeline
+# - handlers for IHandler
+# - styles for IStyle
+path:
+
+# The full import path for the class implementing IPlugin.
+class:
+
+# Whether to enable this plugin or not.
+enable: no
+
+# Additional config for this plugin. The path can be either a file system path
+# or a Python import path. If the value starts with python: then it is
+# a Python import path, otherwise it is a file system path. File system paths
+# must be absolute since no guarantees are made about the current working
+# directory. Python paths should not include the trailing .cfg, which the file
+# must end with.
+configuration:
+
[shell]
# `mailman shell` (also `withlist`) gives you an interactive prompt that you
@@ -138,8 +162,6 @@ data_dir: $var_dir/data
cache_dir: $var_dir/cache
# Directory for configuration files and such.
etc_dir: $var_dir/etc
-# Directory containing Mailman plugins.
-ext_dir: $var_dir/ext
# Directory where the default IMessageStore puts its messages.
messages_dir: $var_dir/messages
# Directory for archive backends to store their messages in. Archivers should
@@ -261,6 +283,7 @@ debug: no
# - http -- Internal wsgi-based web interface
# - locks -- Lock state changes
# - mischief -- Various types of hostile activity
+# - plugin -- Plugin logs
# - runner -- Runner process start/stops
# - smtp -- Successful SMTP activity
# - smtp-failure -- Unsuccessful SMTP activity
@@ -298,6 +321,9 @@ level: info
[logging.mischief]
+[logging.plugin]
+path: plugin.log
+
[logging.runner]
[logging.smtp]
@@ -797,11 +823,6 @@ class: mailman.archiving.prototype.Prototype
[styles]
-# Python import paths inside which components are searched for which implement
-# the IStyle interface. Use one path per line.
-paths:
- mailman.styles
-
# The default style to apply if nothing else was requested. The value is the
# name of an existing style. If no such style exists, no style will be
# applied.