From 8e412a7a614c232662cb1728a04ed19b9b877693 Mon Sep 17 00:00:00 2001 From: J08nY Date: Mon, 29 May 2017 00:22:11 +0200 Subject: Add plugin spec, add core changes required - An out-of-tree approach is necessary for implementing encrypted mailing lists into Mailman 3, so the original proposal is being revised to reflect this. With general changes to core that will be usable by any plugin and a specific encrypted lists plugin. --- core_changes.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 core_changes.md (limited to 'core_changes.md') diff --git a/core_changes.md b/core_changes.md new file mode 100644 index 0000000..2fec7ee --- /dev/null +++ b/core_changes.md @@ -0,0 +1,44 @@ +## Proposed changes to Mailman core + + 1. Add configuration option similar to `config.styles.paths` but for general plugins. Paths in this list will be used to find components that Mailman will use, similar to `find_components` coupled with a standardized plugin structure: + - `plugin package` + - `handlers` + - `rules` + - `chains` + - `commands` + - `pipelines` + - `styles` + - `rest` + + 2. Let plugins add Pipelines the same way they can add Handlers, Rules etc... + - This means refactoring `BasePipeline`, `OwnerPipeline`, `PostingPipeline`, `VirginPipeline` from `mailman.core.pipelines.py` into a package `mailman.pipelines` + - Use `find_components`, or rather it's sibling function created in 1. + + 3. Let plugins subscribe to receive events. + + 4. Let List creator specify List Style when creating it through Postorius. + - The REST api supports it, add bindings to MailmanClient and a field to Postorius. + + 5. Allow multiple callables in `pre_hook` and `post_hook` run in order specified. + - Already a [MR](https://gitlab.com/mailman/mailman/merge_requests/264). + + 6. Drop `ext_dir`. + + 7. Let plugins add routes to the REST API. Under `/plugins//...`. + + - Create a new `IRESTSink` interface, that is callable `func(request, response)` and knows it's prefix relative to it's root. + - Use `falcon.API.add_sink(callable, prefix)` to add all `IRESTSink`s from both `mailman.rest` package(unused, no sinks necessary for core) and plugin's `.rest` package. + - [falcon.API.add_sink](https://falcon.readthedocs.io/en/stable/api/api.html#falcon.API.add_sink) + + 8. ? Make all commands be able to require confirmation and make this a configurable option. + + - How? + + 9. Add possibility of config inclusion to `mailman.cfg`, or of per-plugin config. + + +## Proposed changes to MailmanClient + + 1. Add bindings for `/plugins//...`. + + - Pretty low-level, since each plugin can handle requests as it wants. \ No newline at end of file -- cgit v1.2.3-70-g09d2