Differences between revisions 1 and 2
Revision 1 as of 2011-03-26 11:13:18
Size: 1767
Editor: msapiro
Comment:
Revision 2 as of 2011-03-26 12:04:35
Size: 1768
Editor: msapiro
Comment: Fix typo.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma page-filename DOC/versions/11960325 #pragma page-filename DOC/versions/13303962
Line 30: Line 30:
The above will allow {{{text/html}}} parts to remain after initial filtering, but in order that the pass the remaining steps unchanged, you must set The above will allow {{{text/html}}} parts to remain after initial filtering, but in order that they pass the remaining steps unchanged, you must set

How do I preserve HTML formatting while filtering other content?

If you want to filter content with Mailman's content filtering, but preserve HTML message formatting, there are a few things you must do. You must ensure that MIME type text/html is not removed. The normal way to do this is to put text/html in pass_mime_types along with your other settings. Adding this to the distributed defaults results in

multipart/mixed
multipart/alternative
text/plain
text/html

however, since there are other multipart sub-types that are commonly used such as multipart/related, a better option is

multipart
text/plain
text/html

The above will allow text/html and text/plain parts to remain in the messages after the initial filtering. You may also want to allow those parts to remain if they are sub-parts of an attached forwarded message message/rfc822 part, and you may want to allow PGP signatures application/pgp-signature resulting in pass_mime_types containing

multipart
message/rfc822
text/plain
text/html
application/pgp-signature

The above will allow text/html parts to remain after initial filtering, but in order that they pass the remaining steps unchanged, you must set

Should Mailman collapse multipart/alternative to its first part content?
(Edit collapse_alternatives)

to No so that a text/html alternative part is not removed in favor of a text/plain alternative, and

Should Mailman convert text/html parts to plain text?
This conversion happens after MIME attachments have been stripped.
(Edit convert_html_to_plaintext)

to No for the obvious reason.

MailmanWiki: DOC/How do I preserve HTML formatting while filtering other content? (last edited 2011-12-08 11:07:30 by msapiro)