[Mailman-Developers] Query regarding plugin integration with mailman3

Stephen J. Turnbull stephen at xemacs.org
Sun Mar 1 14:55:30 CET 2015


Aanand Shekhar Roy writes:

 > Can someone tell me if the following way is suitable for implementing a
 > plug in on mailman3 :

See

src/Mailman/mailman/src/mailman/core/chains.py
src/Mailman/mailman/src/mailman/core/pipelines.py

[@Barry This stuff seems kinda underdocumented, at least in this module?]

 > In that folder we make an executable file i.e. .sh file, which runs
 > the script that adds the code mentioned above in the right places
 > of mailman3 src code.

This is not the way to create a plugin for a Python program.  The
chains and pipelines code show the right way to do that: create a
simple module that Python can import given its name, and then have
that module do any further loading of code necessary for the plugin
implementation.

The question that remains is whether a chain (which is used to check
whether a message should be distributed at all) or a pipeline handler
(which manipulates messages) is sufficient for the plugins you
envision.  I don't see why they would not be -- they are quite general
mechanisms -- but there may be edge cases I haven't thought of.



More information about the Mailman-Developers mailing list