core_changes.md 4.93 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
## 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`
12 13 14 15 16 17 18
    - [MR !288](https://gitlab.com/mailman/mailman/merge_requests/288)
      Adds a whole configuration section for plugins, where each plugin has the following options:
        - name of the section
        - `class:` a class implementing the new `IPlugin` interface.
        - `path:` a python package available on `sys.path` under which the aforementioned plugin structure, searched for components, resides.
        - `enable:` whether the plugin is enabled, only enabled plugins are searched for components, their classes instantiated, their hooks run and their REST routes exposed.
        - `configuration:` optional configuration path, which the plugin can use to read/write it's configuration file.
19 20

  2. Let plugins add Pipelines the same way they can add Handlers, Rules etc...
21
    - [<s>MR !287</s> merged](https://gitlab.com/mailman/mailman/merge_requests/287)
22 23 24 25
    - 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.
26
    - [MR !288](https://gitlab.com/mailman/mailman/merge_requests/288)
27

28 29
  4. Allow multiple callables in `pre_hook` and `post_hook` run in order specified. Also allow callables for when Mailman exits.
    - [MR !288](https://gitlab.com/mailman/mailman/merge_requests/288)
30
    - Already a similar [MR !264](https://gitlab.com/mailman/mailman/merge_requests/264).
31

32
  5. Allow Mailman core to send events to Postorius, HyperKitty and any app that subscribes through a new REST api call with a callback.
33
    - Implemented in the [mailman-rest-events](https://gitlab.com/J08nY/mailman-rest-events) plugin.
34

35 36
  6. Drop `ext_dir`.
    - [MR !288](https://gitlab.com/mailman/mailman/merge_requests/288)
37

38 39 40
  7. Let plugins add routes to the REST API. Under `/plugins/<plugin_name>/...`.
    - [MR !288](https://gitlab.com/mailman/mailman/merge_requests/288)
    - Use the current `ObjectRouter` with plugins providing a REST object.
41

42 43 44
  8. Add per-plugin config.
    - [MR !288](https://gitlab.com/mailman/mailman/merge_requests/288)

45 46 47
  9. Add `description` attribute to `IStyle` and the default styles, so that mailing list styles have some human readable string to show.
    - [MR !289](https://gitlab.com/mailman/mailman/merge_requests/289)

48 49 50 51 52 53 54 55 56 57 58 59 60
 10. Refactor Subscription and Unsubscription workflow to allow a plugin to add steps to it's state machine.
    - Introduces `IWorkflow` interface for the workflow state machine.
    - Allows the `WorkflowStateManager` to store more workflow steps than the current one and adds a migration for this change.
    - Refactors the monolithic SubscriptionWorkflow and UnsubscriptionWorkflow classes to reusable mixins, allowing to deduplicate their code and create custom workflows.
    - Dynamically loads all `IWorkflow` classes from Mailman core and plugins.
    - Migrates the `subscription_policy` and `unsubscription_policy` attributes from the `SubscriptionPolicy` enum, to store the name of the respective SubscriptionWorkflow class, dynamically loaded.
    - [MR !299](https://gitlab.com/mailman/mailman/merge_requests/299)
    - On top of [MR !300](https://gitlab.com/mailman/mailman/merge_requests/300) which instantiates components only in the `add_components` utility function and not at lower levels, since Workflow components need to be stored as classes and instantiated on use.

  11. Add SMTPS and STARTTLS support.
    - Adds SMTP over SSL/TLS and STARTTLS SMTP extension support to the `BaseDelivery` class via specialized `Connection` classes.
    - Creates a new `ISMTPConnection` interface, which `SMTPConnection`,`SMTPSConnection` and `STARTTLSConnection` implement.
    - [MR !286](https://gitlab.com/mailman/mailman/merge_requests/286)
61 62 63

## Proposed changes to MailmanClient

64
 1. Add bindings for specifying list-style on list creation.
65
    - [MR !28](https://gitlab.com/mailman/mailmanclient/merge_requests/28)
66 67

 2. Add bindings for `/plugins/<plugin_name>/...`.
68
    - Pretty low-level, since each plugin can handle requests as it wants.
69
    - [MR !34](https://gitlab.com/mailman/mailmanclient/merge-requests/34)
70 71 72

## Proposed changes to Postorius and HyperKitty

73 74 75
 1. Add additional blocks to some base templates.

 2. Add a dropdown list-style selection field to list creation template + view.
76
    - [MR !214](https://gitlab.com/mailman/postorius/merge_requests/214)
77

78
 3. Let Postorius and HyperKitty subscribe to receive events from Mailman Core, add an API route to receive them in django-mailman3.