[Mailman-Users] Tip for finding in the source

Mark Sapiro msapiro at value.net
Fri Mar 17 22:04:15 CET 2006

Oliver Schulze L. wrote:

>(To list moderator: please don't block this email, its an already 
>started discussion,
>I need to provide feedback to Mark, I need to post the patch, thanks)

The moderator didn't block your first message. Content filtering
discarded it because after removing the text/html part, there was
nothing left.

>What I need to do is:
>- if the email have been marked as Spam by the Mailman Spam filters,
>  comment the line:
>  #nmsg.attach(MIMEMessage(msg))
>  else, include the original email:
>  nmsg.attach(MIMEMessage(msg))

So you need to add the logic to do this. E.g., instead of just
commenting out the attachment of the message


you need something like

            if msg.get('x-spam-flag') <> 'YES':

>- Detect if the email has been rejected because the Mailman Spam Filter
>  made a hit.

Isn't this the same thing as above?

>- I never code in python(but did in C++, php, perl, etc). My question 
>is, how do
>  I convert the Hold.py to Hold.pyc ?

Python does it automatically the first time the module is imported with
the timestamp on the .py later than the .pyc, it will recompile and
save a new .pyc (assuming it has permission).

>I made this patch to:
>--- Hold.py.ori 2006-03-17 17:03:27.000000000 -0300
>+++ Hold.py     2006-03-17 17:02:55.000000000 -0300
>@@ -274,7 +274,7 @@
>             dmsg['Sender'] = requestaddr
>             dmsg['From'] = requestaddr
>             nmsg.attach(text)
>-            nmsg.attach(MIMEMessage(msg))
>+            #nmsg.attach(MIMEMessage(msg))
>             nmsg.attach(MIMEMessage(dmsg))
>             nmsg.send(mlist, **{'tomoderators': 1})
>         finally:

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