Re: [Mailman-Users] handler to auto detach attachment and link it to a website keeping html

2014-04-16 Thread Mark Sapiro
On 04/15/2014 09:08 AM, Sylvain Viart wrote: I borrowed a code from Mailman/Handlers/MimeDel.py def reset_payload(msg, txt, fname, url): # Reset payload of msg to contents of subpart, and fix up content headers msg.set_payload(txt) del msg['content-type'] del

Re: [Mailman-Users] handler to auto detach attachment and link it to a website keeping html

2014-04-15 Thread Sylvain Viart
Hi, Le 13/04/2014 17:55, Mark Sapiro a écrit : withlist is the tool for this. + http://www.msapiro.net/scripts/test_handler.py I also updated the FAQ at http://wiki.list.org/x/l4A9 to point to this script. Thanks, it saves me a lot of re-testing boring emails. Especially useful as I never

Re: [Mailman-Users] handler to auto detach attachment and link it to a website?

2014-04-13 Thread Mark Sapiro
On 04/11/2014 02:06 PM, Mark Sapiro wrote: Development question, is there a way to test the handler against a mail content, outside of the full mailman context? Something like: $ python -some-useful-switch-here MyHandler.py mymail_withheader.txt withlist is the tool for this. When I

Re: [Mailman-Users] handler to auto detach attachment and link it to a website?

2014-04-11 Thread Sylvain Viart
Hi, Le 28/03/2014 16:58, Mark Sapiro a écrit : As it says in that post, scrub_nondigest is an all or nothing feature. I may code the behavior I've described for my need : Detaching attachment, storing, linking back into the original mail. 4.67. How do I implement a custom handler in

Re: [Mailman-Users] handler to auto detach attachment and link it to a website?

2014-04-11 Thread Mark Sapiro
On 04/11/2014 08:54 AM, Sylvain Viart wrote: 4.67. How do I implement a custom handler in Mailman http://wiki.list.org/pages/viewpage.action?pageId=4030615 Following instruction here, I've started to develop my custom handler, as Scrubber is scrubbing too strong for my purpose.

Re: [Mailman-Users] handler to auto detach attachment and link it to a website?

2014-04-11 Thread Stephen J. Turnbull
Sylvain Viart writes: Development question, is there a way to test the handler against a mail content, outside of the full mailman context? I forget the exact incantation, but I have a test list, and just test for the test list at the top of the Handler, and return success immediately.

Re: [Mailman-Users] handler to auto detach attachment and link it to a website?

2014-03-29 Thread Sylvain Viart
Hi, Thanks for the information. In fact, topics I've found about scrubbing, or detaching attachment, are pretty old, related to computer science… That's why I'm asking for fresh 2014 confirmation. :-) Le 28/03/2014 16:58, Mark Sapiro a écrit : As it says in that post, scrub_nondigest is an

Re: [Mailman-Users] handler to auto detach attachment and link it to a website?

2014-03-28 Thread Sylvain Viart
Hi Mark, Le 26/03/2014 20:32, Mark Sapiro a écrit : My question is: Is there any handler that I can setup in the pipeline to: * detach an attachment * post it to a webservice (or run a script uploading it to an online storage) * modify the content of the mail, linking it to the

Re: [Mailman-Users] handler to auto detach attachment and link it to a website?

2014-03-28 Thread Peter Shute
Could someone please tell me which manual this scrub_nondigest option is described in? I didn't know mailman could do this. Sent from my iPad On 27 Mar 2014, at 5:33 am, Mark Sapiro m...@msapiro.net wrote: Sylvain Viart wrote: My question is: Is there any handler that I can setup in

Re: [Mailman-Users] handler to auto detach attachment and link it to a website?

2014-03-28 Thread Mark Sapiro
On 03/27/2014 11:31 PM, Sylvain Viart wrote: Le 26/03/2014 20:32, Mark Sapiro a écrit : How about just setting the list's web admin Non-digest options - scrub_nondigest to Yes. I've also found this option here, I didn't notice it before. Any attachments larger than that size, I'd like

Re: [Mailman-Users] handler to auto detach attachment and link it to a website?

2014-03-28 Thread Mark Sapiro
On 03/28/2014 07:06 AM, Peter Shute wrote: Could someone please tell me which manual this scrub_nondigest option is described in? I didn't know mailman could do this. It should be documented in the List Administrator's Manual

[Mailman-Users] handler to auto detach attachment and link it to a website?

2014-03-26 Thread Sylvain Viart
Hi, I've a project to setup a mailman for newsletter. I've found many interesting links about it. I will post them as a reminder at the end of this message, as it can help someone else. My question is: Is there any handler that I can setup in the pipeline to: * detach an attachment *

Re: [Mailman-Users] handler to auto detach attachment and link it to a website?

2014-03-26 Thread Mark Sapiro
Sylvain Viart wrote: My question is: Is there any handler that I can setup in the pipeline to: * detach an attachment * post it to a webservice (or run a script uploading it to an online storage) * modify the content of the mail, linking it to the online stored attachment