|author||J08nY||2017-05-29 00:22:11 +0200|
|committer||J08nY||2017-05-29 00:22:11 +0200|
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.
2 files changed, 76 insertions, 0 deletions
diff --git a/core_changes.md b/core_changes.md
new file mode 100644
@@ -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/<plugin_name>/...`.
+ - 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/<plugin_name>/...`.
+ - Pretty low-level, since each plugin can handle requests as it wants. \ No newline at end of file
diff --git a/plugin.md b/plugin.md
new file mode 100644
@@ -0,0 +1,32 @@
+# PGPMailman plugin
+ * `pgpmailman` - A Core plugin.
+ - `styles` - Both styles generate a list keypair based on plugin settings on list creation as well as set other attributes for an encrypted mailing list.
+ - `EncryptedDefaultStyle`
+ - `EncryptedAnnounceStyle`
+ - `pgp` - Module that handles lower-level pgp related stuff. Such as the GPG keyrings, lookup of keys, encryption of messages, decryption, etc...
+ - `commands`
+ - `KeyEmailCommand` - Handles user key management through the `key` command.
+ - `KeyCLICommand`
+ - `runners`
+ - `EncryptedIncomingRunner` - Decrypts incoming messages for encrypted mailing lists and checks their signatures before passing them to the default IncomingRunner. Messages to ordinary lists are passed to the default IncomingRunner wthout change.
+ - `EncryptedOutgoingRunner` - Encrypts and optionally signs for configured lists. This is a runner and not a Pipeline since we need to encrypt all outgoing messages, so digests, virgin messages, posts...
+ - `archivers`
+ - `EncryptedHyperKittyArchiver` - Fetches list archive public keys from `pgphyperkitty`, uses them to send messages to archive encrypted, for encrypted lists.
+ - `initialize()` - A callable to be setup in a Mailman hook, to setup everything necessary for pgpmailman to run. Such as adding the `listname-key`@ subaddress, creating keyrings if not found, subscribing to events if necessary.
+ * A setuptools package that needs to be installed into the same virtualenv as the Mailman 3 instance.
+ * Custom runners, archivers and other site configuration options would need to be set. \ No newline at end of file