[Mailman-Developers] Modifying mailman to filter archived messages

Laurence Berland laurence@digitalpulp.com
Mon, 22 Jul 2002 17:05:24 -0400


On Wednesday 17 July 2002 04:41 pm, Barry A. Warsaw wrote:
> >>>>> "LB" == Laurence Berland <laurence@digitalpulp.com> writes:

>     ...
>     from Mailman.Handlers import OurStatusMunger
>     ...
>     if getattr(mlist, 'munge_status_p', 0):
> 	OurStatusMunger.process(mlist, msg, msgdata)
>     ...
>

I'm mostly following this, but am having a little trouble at the point where I 
write the process function.  Looking at other handlers I've determined I can 
get a header by msg.gtheader(header-name-string) and get the body by 
msg.body.  I've also determined you can alter headers by setting 
msg[header-name-string] but what I haven't figured out it what I can do to 
set the body to something.  The idea is to apply a regular expression on the 
body of the message.

Thanks again for all the help,
Laurence