| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
| |
- Adds an optional 'conriguration' option similar to the one in
[mta] which plugins can use to load their specific configs from.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Adds the rest_object method to the IPlugin interface. This method
is called by the REST api to route requests to the plugin's REST
api. All attributes are proxied, so the object becomes a true
REST object in the ObjectRouter hierarchy. For example see the
RESTExample and ExamplePlugin classes in mailman.testing.plugin.
The plugin might return None from this method, in which case
all calls to it's REST api route will return 404 NotFound.
- Adds new routes to the REST api. For version >= 3.1:
- /3.1/plugins
Returns a dictionary with plugin names as keys, and their configs
as values.
- /3.1/plugins/<plugin_name>
Proxies everything to plugin's rest_object, if plugin with such
name exists and provides a non-null rest_object, else NotFound.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Removes pre_hook, post_hook and ext_dir. With the latter being
unused. Warns on startup if the hooks are present in config.
- Adds IPlugin interface with pre_hook and post_hook methods.
- Adds 'class' config parameter to plugins, which can be set to
a class implementing the IPlugin interface, it will be
initialized once on Mailman's startup, then before the DB
setup the pre_hook will be run, after DB and other components
the post_hook will be run. Plugin instances are stored in the
config.plugins dict, with keys being their configuration section
names.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Adds the notion of a 'plugin'.
- A plugin has a package path and a flag specifying whether
it's enabled or not.
- Adds a find_pluggable_components function similar to the
find_components one. This one dynamically searches not only
the mailman package but all of plugins.
- e.g. find_pluggable_components('rules', IRule) finds
all IRule components in mailman.rules but also in
example_plugin.rules for plugin names example_plugin.
- Uses the find_pluggable_components function in place of
find_components when searching for Rules, Handlers, Chains,
EmailCommands, and Styles.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We did not previously complete the renaming of the templates. Rename:
* user:ack:welcome -> list:user:notice:welcome
* user:ack:goodbye -> list:user:notice:goodbye
The new names are what are actually used in send_welcome_message() and
send_goodbye_message() so the old names were actually never used.
NOTE: If you added welcome or goodbye templates through REST from git head,
the old names will not be used. Given that this wasn't a feature in 3.0, and
the above use case is very unlikely, I've decided not to do a migration. If
anybody is affected, the changes can be made manually in withlist.
Closes: #337
|
| |
|
|
| |
Closes #335
|
| | |
|
| |
|
|
|
|
| |
tests for for the exceptions.
Enhanced the InvalidListNameError exception to return the invalid name.
|
| | |
|
| |
|
|
| |
Closes #42
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Also:
* Change doctest cleanups to be an ExitStack.
* Added [dmarc]cache_lifetime setting.
* Cleanup pass through dmarc-mitigation.rst.
* Be sure the cached org domain file is cleaned up when the world is reset.
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| |/
|/| |
|
| | | |
|
| | |\ |
|
| | | | |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Don't show the disabled archivers in the REST API
Previously, system-disabled archivers were shown in the REST API. As a result it was possible to enable them without a validation error, but they would stay disabled on the next API GET call (their actual activation status depends on the list-specific *and* the system-wide status).
Because one can't add a configuration overlay to the running REST server
in testing mode, the prototype archiver was disabled in the testing
configuration. This is where most of the changes in this commit come
from.
See merge request !87
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Because one can't add a configuration overlay to the running REST server
in testing mode, the prototype archiver was disabled in the testing
configuration. This is where most of the changes in this commit come
from.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
If a message can't be parsed by Python due to bad structure, don't raise an
error but return a generic 'this message is defective' string instead.
|
| | |_|/
|/| | |
|
| | | |
| | |
| | |
| | |
| | | |
This works around Python issue 28548 and fixes #288.
Test given by Amit.
|
| | |/
|/| |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This merges the SubscriptionManager and UnsubscriptionManager into a
single SubscriptionManager implementation that handles both register()
and unregister(). This allows us to use direct class-based adaptation
instead of the more clunky getAdapter() API. We can also eliminate the
funky _get_workflow() implementation detail.
This has a couple of side-effects. .confirm() must lookup the token in
the pendings database and pull out the pending type, dispatching to the
proper class depending on the type, or raising a LookupError if the
token is None or there is no pendable associated with the given token.
This feels like an acceptable trade-off.
However, this *also* means that IWorkflowStateManager must lose its
'name' argument in its methods. That's because we won't actually know
the name until its too late. Honestly, the name wasn't providing much
value anyway (it was always the subclass's name), so losing that seems
fine too. The complication here is that the name was a primary key in
the 'workflowstate' table, so we need to add its removal in the database
migration.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* events
* notices
* handlers
Also, be sure to do only one `leave` command per email.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
A mailing list's ``description`` must not contain newlines. Given by
Aurélien Bompard.
|
| |/
|
|
| |
Fixes: #273
|
| | |
|
| |
|
|
|
| |
The new template system is introduced for API 3.1. See
``src/mailman/rest/docs/templates.rst`` for details.
|