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
replaced.
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.
-Rob
-----Original Message-----
From: Mark Sapiro [mailto:[EMAIL PROTECTED]
Sent: Friday, May 05, 2006 10:20 AM
To: Rob Jackson; [email protected]
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)
msg.set_payload(pl)
--
Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Security Policy:
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp