Hong Jiang Tian wrote: > >We have some mailing lists that need to remove all types of attachments >(whatever plain text or non-plain text) from the messages. We don't allow >users to post the emails with attachments on these mailing lists. > >I have looked at FAQ 1.8 and 4.13. I also searched the archive of the >Mailman user mailing list. I found that I could remove the MIME with HTML, >Word or some other content types. But I didn't find the answer to remove >attachments of the plain text file. Do you or other people know how to >resolve it?
It depends on how you want to resolve it. If you want to strip all attachments including content-type text/plain attachments while allowing the primary text/plain part to go to the list, then the answer is no - you can't do that with content filtering as it exists. If you are willing to allow all text/plain parts, whether the primary part or an attachment, you can do that and strip everything else. If you are willing to reject any post that contains any kind of attachment and accept only single part text/plain or only single part text/plain and text/plain parts from multipart/alternative, you can do that too. Examples: To reject everything except single part text/plain set filter_content Yes pass_mime_types text/plain filter_action Reject To also accept plain text parts from multipart/alternative, add multipart/alternative to pass_mime_types above. I.e pass_mime_types becomes text/plain multipart/alternative To accept most text/plain parts including attachments and text/plain parts from forwarded messages, pass_mime_types becomes multipart/mixed multipart/alternative message/rfc822 text/plain There is no way to accept only the first text/plain part from a multipart/mixed part that contains more than one text/plain part. -- 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/
