Configuring MIME handlers This program uses three files to configure itself for viewing or handling MIME attachments. MIME stands for "Multimedia Internet Mail Extensions", and is a standard form for providing arbitrary information including images and audio through the normally text-based mail system. The location of these files can be tailored on a per-user basis via preferences. The default is the LIBDIR (/usr/local/lib/ml), which may be tailored for all users on the system. If users wish to over-ride this default location, they need to set a new directory location via their preferences, and then copy the three files (not all of which are necessarily in existence) to this personal directory. Then these files may be edited to personal taste. Following are detailed descriptions of the three files involved. /usr/local/lib/ml/mime.types Defines all known MIME types. The types known to me are built-in to the program, so this file need not be present. If it is, it over-rides the built-in type list, and therefore must contain all known MIME types. It is simply a list, one entry per line, with MIME type/subtype strings and no leading or trailing whitespace. You may wish to create this list "in reverse", since the first entry will appear last in the program's list. Example: application/postscript application/octet-stream image/gif ...etc. /usr/local/lib/ml/mime.map Defines filename extension to MIME type/subtype mapping; for use when loading file attachments. Several default types are built-in to the program. If this file exists, it will over-ride the built-in filename extension mappings, so must be complete. It contains a filename suffix, white space, and a MIME type/subtype pair, one to a line. Uppercase and lowercase differences are ignored. For example: .ps application/postscript .c text/plain .Z application/octet-stream .gif image/gif /usr/local/lib/ml/mime.handlers Defines MIME handlers or "helper applications" for processing attachments. A few types are built-in to the program and cannot be over-ridden. This list of built-in types may change in future releases. text/plain multipart/{anything} message/external-body (we handle mail-server and FTP access only. Other types can be externally processed). message/RFC822 The file contains type/subtype pairs, followed by a semi-colon, and then the complete command to execute to "view" the attachment. If %s is in the command, the message will come from a temporary file, otherwise the message will come from stdin. Only one %s (and no other % characters) may appear. If the program requires a TTY for keyboard interaction, be certain to prefix the command a command to launch an interactive terminal, such as "xterm -e". After the "view" command, you may optional provide a space followed by $COMPOSE= and a command to compose a message of this type. This command MUST put its results in a file, designated by %s. You may have either a view handler or a compose handler, or both. An entry for a specific type is terminated by an end-of-line. There are no "continuation lines". If you use "metamail" (from Bellcore Labs), this type of file file format should be vaguely familiar, although there are several differences between this format and the metamail mailcap file. It is possible to use many of the metamail handlers, just be aware of the possible need to specify an xterm, and the differences in $COMPOSE= syntax. A sample file is included below, showing what I use for basic support. Any handlers not specified results in a file-save request when viewed. Additionally, a preference available in the Options Settings menu, allows you to be prompted before executing any external view handler (including none), and allows you to change it. This setting is "true" by default, so there is no need to edit the preferences file except to turn it off, which allows automatic processing with no interaction (where possible). Example: audio/basic; play %s $COMPOSE=xterm -e audiocompose %s image/gif; xv %s $COMPOSE=xgrabsc -s 2 -xwd | xwdtogif > %s image/tiff; xv %s image/jpeg; xv %s video/mpeg; mpeg_play %s message/external-body; $COMPOSE=xterm -e extcompose %s application/postscript; lpr %s application/pgp; xterm -e pgp %s text/richtext; xterm -e richtext %s text/html; netscape file://localhost%s