Content Filtering

I don't know a lot about scripts, so the most useful answers would involve just telling me what settings to use.
I would like to have content filtering turned on, because I would like to make sure that attachments don't go out on the list, and especially the dangerous ones.
Here are my problems (I have not yet added a lot of names, and am still in the testing stage):
- When I try to turn Content Filtering on, my email (an announcement of shows at a folk club, with links and some html) comes through with the html intact and a message at the top saying:
"The message's content type was not explicitly allowed"
When I turn CF off, there is no strange message and the email comes through ok, but I worry that someone else might send an email with a bad attachment.
- When I tried to send the same message with a pdf and a Word doc, just to test it, the message went through without any content at all -- neither the attachments nor the actual email message came through.
Here are the settings I am using:
Yes
Blank
multipart/mixed multipart/alternative text/plain message/rfc822
exe bat cmd com pif scr vbs cpl
Blank
Yes Yes Reject

Just to add a little more -- I'm still experimenting:
When I remove the html coding and send my message as plain text, that annoying message, "The message's content type was not explicitly allowed", disappears.
And when I send the message as plain text, and include the attachments, the message comes out fine, and without the attachments (this is good -- I set Content Filtering to be on).
Question: Why doesn't Mailman convert the html to plaintext on its own?
The intro to Content Management says:
Finally, any text/html parts that are left in the message may be converted to text/plain if convert_html_to_plaintext <https://lists.mayfirst.org/mailman/admin/peoplesvoicecafe/contentfilter?VARH...> is enabled and the site is configured to allow these conversions.
I have "convert to text/plain" enabled.
What does the second part mean? How do you configure your site to allow these conversions? Is it something a regular administrator could do, or is it something that the host site of my Mailman list has to do?
On 1/17/11 11:47 AM, Ruth Indeck wrote:
I don't know a lot about scripts, so the most useful answers would involve just telling me what settings to use.
I would like to have content filtering turned on, because I would like to make sure that attachments don't go out on the list, and especially the dangerous ones.
Here are my problems (I have not yet added a lot of names, and am still in the testing stage):
- When I try to turn Content Filtering on, my email (an announcement of shows at a folk club, with links and some html) comes through with the html intact and a message at the top saying:
"The message's content type was not explicitly allowed"
When I turn CF off, there is no strange message and the email comes through ok, but I worry that someone else might send an email with a bad attachment.
- When I tried to send the same message with a pdf and a Word doc, just to test it, the message went through without any content at all -- neither the attachments nor the actual email message came through.
Here are the settings I am using:
Yes
Blank
multipart/mixed multipart/alternative text/plain message/rfc822
exe bat cmd com pif scr vbs cpl
Blank
Yes Yes Reject
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 Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/soapbox%40comcast.net

Ruth Indeck wrote:
Question: Why doesn't Mailman convert the html to plaintext on its own?
The intro to Content Management says:
Finally, any text/html parts that are left in the message may be converted to text/plain if convert_html_to_plaintext <https://lists.mayfirst.org/mailman/admin/peoplesvoicecafe/contentfilter?VARH...> is enabled and the site is configured to allow these conversions.
I have "convert to text/plain" enabled.
There are no HTML parts left after filtering because text/html is not in pass_mime_types.
What does the second part mean? How do you configure your site to allow these conversions? Is it something a regular administrator could do, or is it something that the host site of my Mailman list has to do?
It means the HTML to plain text conversion is done by a command set by the Mailman site administrator. The default command is
HTML_TO_PLAIN_TEXT_COMMAND = '/usr/bin/lynx -dump %(filename)s'
which may not work on all systems.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thank you, Mark, for all your responses. I had originally thought I should have the list be able to convert to plain text, but then decided it would be ok to let messages go through as html. But I still wanted it to strip attachments.
I added text/html to the list, and set the bottom two things to "no" and now it is working -- I received the whole message with html, with no funny complaints about not being allowed, and it successfully stripped the test pdf and doc attachments I sent.
Ruth
On 1/17/11 12:19 PM, Mark Sapiro wrote:
Ruth Indeck wrote:
Question: Why doesn't Mailman convert the html to plaintext on its own?
The intro to Content Management says:
Finally, any text/html parts that are left in the message may be converted to text/plain if convert_html_to_plaintext<https://lists.mayfirst.org/mailman/admin/peoplesvoicecafe/contentfilter?VARH...> is enabled and the site is configured to allow these conversions.
I have "convert to text/plain" enabled.
There are no HTML parts left after filtering because text/html is not in pass_mime_types.
What does the second part mean? How do you configure your site to allow these conversions? Is it something a regular administrator could do, or is it something that the host site of my Mailman list has to do?
It means the HTML to plain text conversion is done by a command set by the Mailman site administrator. The default command is
HTML_TO_PLAIN_TEXT_COMMAND = '/usr/bin/lynx -dump %(filename)s'
which may not work on all systems.

Ruth Indeck wrote:
- When I try to turn Content Filtering on, my email (an announcement of shows at a folk club, with links and some html) comes through with the html intact and a message at the top saying:
"The message's content type was not explicitly allowed"
This message did not go to the list. It was rejected per your filter_action = Reject setting because the message's content type was not one of the 4 types you have listed in pass_mime_types.
Most likely, the message was an HTML only message, i.e. Content-Type: text/html.
When I turn CF off, there is no strange message and the email comes through ok, but I worry that someone else might send an email with a bad attachment.
If you want to pass this message with content filtering on, you have to add text/html to pass_mime_types.
Or you can set your mail client to send multipart/alternative with both text/plain and text/html alternatives.
If you do either of the above, with collapse_alternatives and convert_html_to_plaintext both Yes, the messager sent to the list will be plain text only.
If you want oy allow HTML to be sent to the list, add text/html to pass_mime_types and set both collapse_alternatives and convert_html_to_plaintext to No.
- When I tried to send the same message with a pdf and a Word doc, just to test it, the message went through without any content at all -- neither the attachments nor the actual email message came through.
It is not clear what happened here. If the message were multipart/mixed with a text/html part and, e.g., an application/pdf part, with your settings, everything should have been removed and the message rejected with reason "After content filtering, the message was empty".
If the message was actually delivered to the list as an empty message, it must have contained a, possibly blank, text/plain part.
Here are the settings I am using:
Yes
Blank
multipart/mixed multipart/alternative text/plain message/rfc822
exe bat cmd com pif scr vbs cpl
Blank
Yes Yes Reject
With these settings, you need to post plain text or multipart/alternative with a plain text part. If you want to allow HTML, add text/html to pass_mime_types, and set both collapse_alternatives and convert_html_to_plaintext to No, or if you want to convert the HTML to plain text, leave them Yes.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Ruth Indeck