[Mailman-Developers] Storing extra data during pipeline processing

Mark Sapiro mark at msapiro.net
Thu May 7 23:40:53 CEST 2015


On 05/07/2015 01:59 PM, Barry Warsaw wrote:
> On May 07, 2015, at 10:51 PM, Juraj Variny wrote:
> 
>> I have tried already to use msgdata parameter or adding headers to message
>> itself, but was not successful so far. I was thinking about adding external
>> database and putting the data there by message ID, but sure there must be a
>> better way? I hope to publish the code some day, too.
> 
> Can you give some details on what didn't work about using the msgdata
> parameter?  This always flows with the message through the pipeline and is
> preserved in the pickle files as the message moves from runner to runner.
> It's the way handlers are supposed to record information on the message as its
> being processed.


See my reply in this thread. I think I understand.


> This is even more important in Mailman 3 where we've split the pipeline into
> rules and handlers.  Rules are run to determine moderation behavior and rules
> are never supposed to modify the message.  They communicate state to
> (possible) later handlers via the msgdata dictionary.


In MM 3 one can have a rule which checks and verifies signatures and
stores results in the msgdata. Than a handler can use that data to add a
message header both for recipient info and to inform other bits that
might run after there's no longer any msgdata dictionary traveling with
the message.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan


More information about the Mailman-Developers mailing list