[Prev: MIMEFILTERS] | [Resources][TOC] | [Next: MODIFYBODYADDRESSES]

# MIMEINCS

- Syntax
- Description
- Default Setting
- Resource Variables
- Examples
  - Supporting Message-based Attachments
- Version
- See Also

## Syntax

Envariable

  N/A

Element

  `<MIMEINCS>`
  content-type
  content-type
  ...
  `</MIMEINCS>`

Command-line Option

  N/A

## Description

MIMEINCS defines the list of content-types (aka media-types) to allow. If the MIMEINCS resource is not empty, only media-types listed will be allowed. All other media-types will be excluded.

For example, if MIMEINCS is set to the following:

    <MIMEIncs>
    text/plain
    text/html
    </MIMEIncs>

Then only text/plain and text/html media-types are allowed. All other media-types will be excluded.

NOTE: | If a media-type is listed in the MIMEEXCS, it is always excluded, regardless of the value of MIMEINCS.

If all you want to do is exclude a specified set of media-types, then use the MIMEEXCS resource instead.

Base types can also be listed to allow all media-types with a give base. For example, `image/jpg` will only allow JPEG images, but `image` will allow all images.

NOTE: | Use care when setting MIMEINCS since you may unintentionally exclude media-types that you do not want to exclude. See Examples below.

## Default Setting

Nil.

## Resource Variables

N/A

## Examples

MIMEINCS provides strict control over the allowed media-types in your archives, allowing for better security. For example:

    <MIMEIncs>
    text/plain
    </MIMEIncs>

Will only allow text/plain data. All other types will be excluded. For some, this may be ideal, but for many, it may be too restrictive: disallowing other text media types that do not pose security risks. Therefore, the following may be prefered:

    <MIMEIncs>
    text
    </MIMEIncs>

All text media-types are allowed. However, HTML (text/html) does pose security problems. Therefore, you may want to allow all text media-types, excluding HTML:

    <MIMEIncs>
    text
    </MIMEIncs>

    <MIMEExcs>
    text/html
    </MIMEExcs>

### Supporting Message-based Attachments

The media-type `message/rfc822` is commonly used when one message includes another. For example, popular MUAs provide a "forward-as-attachment" feature when reading an email message. When used, MUAs will specify the `message/rfc822` media-type for the attachment.

The following is a more liberal MIMEINCS setting that allows media-types commonly used in email, allows forward-as-attachment cases, and keeps security risks to a minimum:

    <MIMEIncs>
    text
    image
    message
    </MIMEIncs>

NOTE: | Attached messages will still be restricted to the media-types listed in MIMEINCS. For example, if a forwarded message includes a video attachment, the video attachment will be excluded.

## Version

2.6.12

## See Also

MIMEALTPREFS, MIMEEXCS, MIMEFILTERS

[Prev: MIMEFILTERS] | [Resources][TOC] | [Next: MODIFYBODYADDRESSES]