<?php

/*
  
  File: config/mime.conf
  $Author: mhardy $
  $Revision: 1.7 $
  $Date: 1999/04/04 21:45:15 $
  
  IMP: Copywrite 1998 Patrick C. Audley paudley@blackcat.ca
  
  This code is under the GNU Public License
  See the file COPYING in this directory
  
*/


    /*
     *   MIME Type Configuration
     *
     *   This file allows you to configure site-specific MIME types, and control how
     *   HTML email is rendered by IMP. Please read the comments carefully if you change it.
     */

    
    /*   If you would like IMP to handle HTML email, please examine the last 3 examples */

    
    
 /*  If you're adding your own type, each entry is an array, and here are what the parts control:
  *
  *  $mime_actions["type/subtype"] tells the MIME engine what type the array is for
  *
  *  "action":        Determines whether a special driver needs to be called for this type.
  *                   These drivers are implemented in the mimetypes.lib file. Usually "default".
  *
  *  "view":          Determines whether the MIME type is viewable in a stand-alone window
  *                   (This is useful for large things like Word documents via mswordview)
  *
  *  "inline":        Determines whether IMP should display the type in the main message window
  *                   (This is useful for images or HTML or other small things)
  *
  *  "override_text": Determines if this MIME-type will display *in place of* other MIME types.
  *                   This option is not necessarily safe, but can be used well for things like
  *                   displaying HTML parts of email without the non-Rich part. (optional)
  *
  *  "download":      Determines whether the MIME-type is separately downloadable from IMP
  *                   (This is useful for almost everything, like documents, etc)
  *
  *  "icon":          Which icon to use for this MIME-type, icons in <imphome>/graphics (optional)
  *
  *  "view_function": The name of any special MIME-driver needed to view this MIME-type (optional)
  *
  *  "function":      The name of any special MIME-driver needed to download this MIME-type.
  *                   This is required only if "action" is set to "function".
  *
  */

 /*  For example, The first function is a generic text formatter. It
  *  will take a MIME type that is actually text (like application/pgp) and format it.
  *
  *  The second function below display all gifs/jpgs that are 10k or smaller.
  *
  *  The third function will display word attachments if you have mswordview.
  *
  *  ********* The last section controls HTML-mail behavior ***********
  */

$mime_actions["application/pgp"] =
    array(
	  "action"          => "default",
	  "view"            => true,
	  "inline"          => true,
	  "view_function"   => "mime_view_text",
	  "download"        => true,
	  "icon"            => "mime_text.gif"
	  );


$mime_actions["image/"] = array(
				"action"       => "function",
				"function"     => "mime_action_images",
				"view"         => true,
				"download"     => true,
				"icon"         => "mime_image.gif"
				);

$mime_actions["application/msword"] = array(
					    "action"       => "default",
					    "view"         => true,
					    "view_function" => "mime_view_msword",
					    "download"     => true,
					    "icon"         => "mime_msword.gif"
					    );

$mime_actions["application/x-imp-data"] = array(
						"action"       => "function",
						"function"     => "mime_action_ximpdata",
						"view"         => false,
						"download"     => false,
						"icon"         => "mime_broken.gif"
						);

$mime_actions['application/x-gtar'] = array(
					    "action"          => "default",
					    "view"            => true,
					    "view_function"   => "mime_view_tgz",
					    "download"        => true,
					    "icon"            => "mime_compressed.gif"
					    );

// User-contributed mimetypes for various kinds of data
// uncomment them if you want them.

// From: Joao Pedro Goncalves <joaop@iscsp.utl.pt>
// .zip - Uses zipinfo.
// Define $default->path_to_unzip in defaults.conf.
/*
$mime_actions["application/zip"] = array(
					 "action"          => "default",
					 "view"            => true,
					 "view_function"   => "mime_view_zip",
					 "download"        => true,
					 "icon"            => "mime_compressed.gif"
					 );
 */


// From: Joao Pedro Goncalves <joaop@iscsp.utl.pt>
// .rpm - RedHat packages.
// Define $default->path_to_rpm in defaults.conf.
/*
$mime_actions["/x-pn-realaudio-plugin"] =
              array(
                  "action"          => "default",
						"view"            => true,
						"view_function"   => "mime_view_rpm",
						"download"        => true,
						"icon"            => "mime_rpm.gif"
              );
*/


// ***** HTML Email Configuration *****

// There are multiple ways to configure IMP to view HTML sent as email. Here are three.
// It is VERY IMPORTANT to note that if you configure HTML to be viewed inline, it will OVERRIDE
// The text part of the email and replace it with the HTML part. This follows the behavior of most
// "Rich" email clients that send HTML mail with a text and HTML part that are identical except
// for the mark-up.

// If you don't uncomment any of these sections, HTML parts are viewed just like any other attachment.

// Allow the HTML MIME-part to be viewed in another browser window and downloadable, and inline
// This is the safest way to read mail and still have HTML mail render-able, all options are open.
$mime_actions["text/html"] =
    array(
	  "action"          => "default",
	  "view"            => true,
	  "inline"          => true,
	  "override_text"   => false,
	  "view_function"   => "mime_view_html",
	  "download"        => true,
	  "icon"            => "mime_html.gif"
	  );

// View the HTML MIME-part inline, overriding the text part, and be downloadable
// This is not provably 100% safe (you may lose text), but we do sanitize the HTML for security.
/*
$mime_actions["text/html"] =
    array(
	  "action"          => "default",
	  "view"            => true,
	  "inline"          => true,
	  "override_text"   => true,
	  "view_function"   => "mime_view_html",
	  "download"        => true,
	  "icon"            => "mime_html.gif"
	  );
*/
// This is my (mike@itsprojects.com) favorite - HTML inline, not downloadable.
// Overrides text parts. Totally transparent.
// This is just like the previous one, but the user interface is less cluttered without the download option.
// There is the potential danger that we lose some text parts when we do this, but current HTML-email clients
// send the email in such a way that this doesn't happen as far as I know.
/*
$mime_actions["text/html"] =
    array(
	  "action"          => "default",
	  "view"            => true,
	  "inline"          => true,
	  "override_text"   => true,
	  "view_function"   => "mime_view_html",
	  "download"        => false,
	  "icon"            => "mime_html.gif"
	  );
*/

?>
