FAQ
I have a question about Mailman 2.1.9 archives and HTML attachments.
I have a list where the poster has sent mail that contains

This is a multi-part message in MIME format.

--==============r94073253759616889= Content-class: urn:content-classes:message
Content-Type: multipart/related;
boundary="----_=_NextPart_001_01C7DE7E.868176F5";
type="multipart/alternative"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C7DE7E.868176F5
Content-Type: multipart/alternative;
boundary="----_=_NextPart_002_01C7DE7E.868176F5"


------_=_NextPart_002_01C7DE7E.868176F5
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
{The text of the mail in q-p format}
------_=_NextPart_002_01C7DE7E.868176F5
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
{HTML-format of the text}
------_=_NextPart_002_01C7DE7E.868176F5--

------_=_NextPart_001_01C7DE7E.868176F5
Content-Type: image/gif;
name="att6e63a.gif"
Content-Transfer-Encoding: base64
Content-ID: <814212114 at 14082007-29C6>
Content-Description: att6e63a.gif
Content-Location: att6e63a.gif
{a small gif image}
------_=_NextPart_001_01C7DE7E.868176F5
Content-Type: image/jpeg;
name="ray.jpg"
Content-Transfer-Encoding: base64
Content-Description: ray.jpg
Content-Location: http:/....
{a jpg image}
--==============r94073253759616889= Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
{the list footer from Mailman}>
--==============r94073253759616889==--

When I look at the mail in the list archives, my Firefox browser in
Unix shows

The plain text of the message, converted from q-p format to basic
ASCII text.
------------- next part --------------
An HTML attachment was scrubbed...
URL: https:.../attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1857 bytes
Desc: att6e63a.gif
Url : https://.../attachment.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 14513 bytes
Desc: ray.jpg
Url : https://.../attachment.jpeg

When I click on the .gif or .jpeg hyperlinks, I see the images.
But when I click on the .htm hyperlink, I see the HTML text.
If I take that HTML text, save it to /tmp, and then open that file
with Firefox, I see the mail message properly formatted.

I have looked at the ARCHIVE_HTML_SANITIZER variable in Defaults.py,
and I am not clear what value to set so that the .htm hyperlink
will display the formatted HTML source instead of the raw HTML source.
Is this the parameter that I need to change?

I do not do much with HTML-formatted attachments, as I (like others
on this list) believe that they do not belong in e-mail.
----------------------------------------------------------------------
Barry S. Finkel
Computing and Information Systems Division
Argonne National Laboratory Phone: +1 (630) 252-7277
9700 South Cass Avenue Facsimile:+1 (630) 252-4601
Building 222, Room D209 Internet: BSFinkel at anl.gov
Argonne, IL 60439-4828 IBMMAIL: I1004994

Search Discussions

  • Brad Knowles at Aug 14, 2007 at 9:52 pm

    On 8/14/07, Barry Finkel wrote:

    When I click on the .gif or .jpeg hyperlinks, I see the images.
    But when I click on the .htm hyperlink, I see the HTML text.
    If I take that HTML text, save it to /tmp, and then open that file
    with Firefox, I see the mail message properly formatted.
    I believe that this is likely a problem with the mimetypes database
    on your webserver. It's sending the file as a text/plain when it
    should be using an HTML MIME type.
    I have looked at the ARCHIVE_HTML_SANITIZER variable in Defaults.py,
    and I am not clear what value to set so that the .htm hyperlink
    will display the formatted HTML source instead of the raw HTML source.
    Is this the parameter that I need to change?
    I don't think that this has anything to do with Mailman or Python,
    but I may be wrong. At the very least, check out your mimetypes
    database for your webserver and see if there's anything obvious there.

    --
    Brad Knowles <brad at shub-internet.org>, Consultant & Author
    LinkedIn Profile: <http://tinyurl.com/y8kpxu>
    Slides from Invited Talks: <http://tinyurl.com/tj6q4>

    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
  • Mark Sapiro at Aug 19, 2007 at 4:47 am

    Barry Finkel wrote:
    When I click on the .gif or .jpeg hyperlinks, I see the images.
    But when I click on the .htm hyperlink, I see the HTML text.
    If I take that HTML text, save it to /tmp, and then open that file
    with Firefox, I see the mail message properly formatted.

    I have looked at the ARCHIVE_HTML_SANITIZER variable in Defaults.py,
    and I am not clear what value to set so that the .htm hyperlink
    will display the formatted HTML source instead of the raw HTML source.
    Is this the parameter that I need to change?

    Yes, and you need to set it to 3, BUT read the comment in Defaults.py
    about this and think long and hard about it before doing this.


    3 - Remove text/html as attachments but don't HTML-escape them. Note:
    this is very dangerous because it essentially means anybody can send
    an HTML email to your site containing evil JavaScript or web bugs,
    or other nasty things, and folks viewing your archives will be
    susceptible. You should only consider this option if you do heavy
    moderation of your list postings.

    - --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedAug 14, '07 at 4:17p
activeAug 19, '07 at 4:47a
posts3
users3
websitelist.org

People

Translate

site design / logo © 2022 Grokbase