[Mailman-Developers] Query regarding plugin integration with mailman3

Aanand Shekhar Roy 2013001 at iiitdmj.ac.in
Mon Mar 2 10:19:38 CET 2015


Hi,
I was wondering if this approach for creating the plug-in would work:
When the plugin is installed, its .config file will check if required
interfaces are present in the local machine and find and install the code
of plug-in at required place in local machine. A new Rule gets added(by
.config file) in src/mailman/rules that uses IRule interface which checks
our requirements(i.e. confidential information check, banned words etc).
This rule will be added in src/mailman/chain. The rule is checked when
chain runs and takes the action set corresponding to the rule. We make a
module implementing IHandler that modifies the text before forwarding it
in the pipeline in which the whole process is running.

> Aanand Shekhar Roy writes:
>
>  > I was seeking was how to integrate it with the existing src of
>  > mailman in a user's computer.
>
> You don't "integrate [a plugin] with source".  The point of what is
> conventionally meant by "plugin" is that you can add it to an existing
> installation, and it will just work.
>
> In Mailman, enabling a handler is done by adding the handler module
> (either as Python source, which will be automatically compiled, or as
> a precompiled .pyc) to the handlers directory in the installation.
> Any packages imported by the plugin can be placed anywhere on the
> PYTHON_PATH.
>
> To actually configure the "plugin" for use, you install it in the
> appropriate place in a pipeline or chain.  The defaults are kept in
> pipelines.py and chains.py.  I suppose that you can also add them in
> config/mailman.cfg, but I'm not sure of the syntax (I haven't tried to
> do this and don't see any documentation or examples in the obvious
> places).  It should also be possible to add handlers to pipelines for
> individual lists, I guess.
>
>



More information about the Mailman-Developers mailing list