Next Previous Contents

5. Mutt's MIME Support

Quite a bit of effort has been made to make Mutt the premier text-mode MIME MUA. Every effort has been made to provide the functionality that the discerning MIME user requires, and the conformance to the standards wherever possible. When configuring Mutt for MIME, there are two extra types of configuration files which Mutt uses. One is the mime.types file, which contains the mapping of file extensions to IANA MIME types. The other is the mailcap file, which specifies the external commands to use for handling specific MIME types.

5.1 Using MIME in Mutt

There are three areas/menus in Mutt which deal with MIME, they are the pager (while viewing a message), the attachment menu and the compose menu.

Viewing MIME messages in the pager

When you select a message from the index and view it in the pager, Mutt decodes the message to a text representation. Mutt internally supports a number of MIME types, including text/plain, text/enriched, message/rfc822, and message/news. In addition, the export controlled version of Mutt recognizes a variety of PGP MIME types, including PGP/MIME and application/pgp.

Mutt will denote attachments with a couple lines describing them. These lines are of the form:

[-- Attachment #1: Description --]
[-- Type: text/plain, Encoding: 7bit, Size: 10000 --]
Where the Description is the description or filename given for the attachment, and the Encoding is one of 7bit/8bit/quoted-printable/base64/binary.

If Mutt cannot deal with a MIME type, it will display a message like:

[-- image/gif is unsupported (use 'v' to view this part) --]

The Attachment Menu

The default binding for view-attachments is `v', which displays the attachment menu for a message. The attachment menu displays a list of the attachments in a message. From the attachment menu, you can save, print, pipe, delete, and view attachments. You can apply these operations to a group of attachments at once, by tagging the attachments and by using the ``tag-prefix'' operator. You can also reply to the current message from this menu, and only the current attachment (or the attachments tagged) will be quoted in your reply. You can view attachments as text, or view them using the mailcap viewer definition. See the help on the attachment menu for more information.

The Compose Menu

The compose menu is the menu you see before you send a message. It allows you to edit the recipient list, the subject, and other aspects of your message. It also contains a list of the attachments of your message, including the main body. From this menu, you can print, copy, filter, pipe, edit, compose, review, and rename an attachment or a list of tagged attachments. You can also modifying the attachment information, notably the type, encoding and description.

Attachments appear as follows:

-   1 [text/plain, 7bit, 1K]             /tmp/mutt-euler-8082-0 <no description>
    2 [applica/x-gunzip, base64, 422K]   ~/src/mutt-0.85.tar.gz <no description>

The '-' denotes that Mutt will delete the file after sending the message. It can be toggled with the toggle-unlink command (default: u). The next field is the MIME content-type, and can be changed with the edit-type command (default: ^T). The next field is the encoding for