Re: [Mailman-Users] Simple notification handler

2011-12-22 Thread Mark Sapiro
Yves Moisan wrote: > >A final question : I see now that even restarting Mailman won't change >the list-specific handler application and one needs to explicitly delete >it if one wants to get rid of it. That's a good thing. But where are >list-specific pipeline defs stored ? The pipeline attr

Re: [Mailman-Users] Simple notification handler

2011-12-22 Thread Yves Moisan
Hi Mark, Our emails crossed here. I just tried importing my handler on the python prompt and the syntax error popped obvious. The minute the pipeline for the list was set with /bin/config_list I could see the pyc so I knew I was in business. A final question : I see now that even restartin

Re: [Mailman-Users] Simple notification handler

2011-12-22 Thread Yves Moisan
Mark: I had forgotten the ":" at the end of the if line. Sorry for the noise. Yves -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security P

Re: [Mailman-Users] Simple notification handler

2011-12-22 Thread Mark Sapiro
Yves Moisan wrote: > >It seems the handler stops the list from working. When I delete the new >pipeline the list works fine so it's the Python file (or the way I >included it in the pipeline ?) that has a problem. > >I've tried including a she-bang line or not (see below for both the >handler a

Re: [Mailman-Users] Simple notification handler

2011-12-22 Thread Yves Moisan
Hi Mark, It seems the handler stops the list from working. When I delete the new pipeline the list works fine so it's the Python file (or the way I included it in the pipeline ?) that has a problem. I've tried including a she-bang line or not (see below for both the handler and the text fil

Re: [Mailman-Users] Simple notification handler

2011-12-21 Thread Mark Sapiro
On 12/21/2011 8:43 AM, Yves Moisan wrote: > Thank you Mark. I'll give it a try. See . You may want a different re. E,g. r'\W[Ee]rror\W' without IGNORECASE. -- Mark Sapiro The highway is for gamblers, San Francisco Bay Are

Re: [Mailman-Users] Simple notification handler

2011-12-21 Thread Yves Moisan
Thank you Mark. I'll give it a try. Yves You need something like import re from Mailman import Utils from Mailman.Message import UserNotification NTEXT = """The text of the notification. """ NRECIP = 'recipi...@example.com' NFROM = 'sen...@example.com' NSUBJ = 'Notification subject' def pro

Re: [Mailman-Users] Simple notification handler

2011-12-21 Thread Mark Sapiro
Yves Moisan wrote: > >- Parse the Subject line looking for "*rror*" >- If so, send an email to an arbitrary address [...] > >I understand the pipeline system and how I could add the Handler for a >specific list, but I'm looking for a detailed Python API listing >somewhere to see what I can really

[Mailman-Users] Simple notification handler

2011-12-21 Thread Yves Moisan
Hi All, I know this is a relatively easy question, but I don't have enough of the Mailman/Handlers examples and what I got from searching the web to get a clear picture of how to create a simple handler that does this : - Parse the Subject line looking for "*rror*" - If so, send an email to a