[Mailman-Users] Custom footer based on sender's email

Rob Jackson robertj at linux4free.com
Wed May 10 18:30:33 CEST 2006

Ok, I have been trying to use this in several places without success.  I
have added to the Decorate.py and even tried to add it to my custom module
used for a global incoming gateway.  I replaced the re.sub line with:

re.sub('AZ', 'new text', pl)

In the message that I send, I only put AZ in the body of the message.  I do
not get any errors, but nothing happens to the message.  The AZ does not get

Is there something else I need to do to get this working.  I am about to use
procmail to do this, which I really wanted to avoid, as it will add another
step to the process.


-----Original Message-----
From: Mark Sapiro [mailto:msapiro at value.net] 
Sent: Friday, May 05, 2006 10:20 AM
To: Rob Jackson; mailman-users at python.org
Subject: Re: [Mailman-Users] Custom footer based on sender's email

>That is the thing, it will be the same everytime.  It is a message 
>automatically generated from a message board, unfortunatly, we are 
>out-sourcing the message board and they are not capable to change the 
>footer on a user level.

You can delete the incoming footer in the same place you add the new one.
You can do something like

    pl = msg.get_payload(decode=True)
    re.sub(pattern_matching_old_footer, replacement_footer, pl)

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

More information about the Mailman-Users mailing list