[Mailman-Users] Confused About MIME Types

Mark Sapiro msapiro at value.net
Mon Mar 20 20:45:54 CET 2006

Ed Carlsen wrote:

>I am a newbe to mailman and I may ask a dumb question, sorry.
>I have Mailman 2.1.5 and a list working well. I would like to send an attached PDF file to members on the list. I know there is "Content Filtering" to describe the types of MIME to not allow and they must start with multipart as:

No. You're confused already. There is no multipart/text type.

>I don't know MIME well enough to know which types I should not allow to be able to send PDF files attached to a email.
>Can you point me in the right direction?

I find it easiest to leave filter_mime_types empty and use
pass_mime_types to allow those types I want.

A message may consist of a single part in which case it will have no
Content-Type: header (which is text/plain by default) or it will have
a Content-Type: which is not multipart/*.

Messages with attachments always have a content type which is
multipart/* - usually multipart/mixed. Messages with alternatives
(e.g. a plain text part and an HTML part representing the same
content) are multipart/alternative with sub parts like text/plain and

For example, a message with a pdf attachment could have the following
hierarchical structure.

        text/plain - the plain text message
        text/html - the html message
    application/pdf - the pdf attachment

In order to accept the text/plain part and the pdf attachment, you need
the following in pass_mime_types

multipart/mixed          to accept the message at all
multipart/alternative    to accept the part that contains the plain text

(The above two could be simply 'multipart' to accept all multipart
parts since the sub part type must be accepted anyway.)

text/plain               to accept the plain text part, and
application/pdf          to accept the pdf attachment

These would cause the text/html part to be removed and the resultant
message to have the structure

    text/plain - the plain text message
    application/pdf - the pdf attachment

See <http://www.iana.org/assignments/media-types/> for the definitions
of various content types/subtypes.

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

More information about the Mailman-Users mailing list