[imp] [multipart/mixed please help (fwd)]

Jon Parise jon@horde.org
Mon Oct 21 16:55:53 2002


---------------------- multipart/mixed attachment
----- Forwarded message from Norbert.Tupy@fwa-ffo.de -----

Date: Mon, 21 Oct 2002 13:26:53 +0200 (CEST)
From: Norbert.Tupy@fwa-ffo.de
Subject: multipart/mixed please help
To: imp-owner@lists.horde.org
User-Agent: IMP/PHP IMAP webmail program 2.2.8


----- End forwarded message -----

-- 
Jon Parise (jon@horde.org) :: The Horde Project (http://horde.org/)

---------------------- multipart/mixed attachment
Hallo dear imp mainteners and users,

i have a big problem with multipart/mixed mime types in mails, because i can 
only view the first part of the mail.

In my example, please look at the atachement, it is :

--- SIV.AG Rostock Security Server - interested in secure network solutions ? -
email: netintegration@siv.de ---

email-body was scanned and no virus found
----

which is not so important content of the messages.

I dont know, how to do the right things. It must be, i think, in mime.php3.

We use IMP V2.2.8 in a heavy used production environment.
It is not possible at the moment to upgrade our mailserver to a newer version.
We use IMP since two years to our success. Many thanks to the maintainers!!!!

Please help me to implemet the right thing to view the other parts.

With best regards,

Mit freundlichen Grüßen

FWA Frankfurter Wasser- und Abwassergesellschaft mbH

i.A. Tupy
---------------------- multipart/mixed attachment
>From Cordula Günther <Cordula.Guenther@siv.de> Mon Okt 21 10:17:36 2002
X-Sieve: cmu-sieve 2.0
Return-Path: <cyrus@fwa-ffo.de>
Delivered-To: hl.kvasy@fwa-ffo.de
Received: from localhost (localhost [127.0.0.1])
	by mail.fwa-ffo.de (emailserver) with ESMTP id AFCB48747B
	for <hl.kvasy@fwa-ffo.de>; Mon, 21 Oct 2002 10:17:36 +0200 (CEST)
Received: by mail.fwa-ffo.de (emailserver, from userid 96)
	id 2C20D8747A; Mon, 21 Oct 2002 10:17:34 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
	by mail.fwa-ffo.de (emailserver) with ESMTP id 102CF8747B
	for <monika.lueck@fwa-ffo.de>; Mon, 21 Oct 2002 10:17:34 +0200 (CEST)
Received: from localhost (portal.fwa-ffo.de [10.0.0.10])
	by mail.fwa-ffo.de (emailserver) with ESMTP id C5A8A8747A
	for <monika.lueck@fwa-ffo.de>; Mon, 21 Oct 2002 10:17:32 +0200 (CEST)
Envelope-to: Monika.Lueck@fwa-ffo.de
Delivery-date: Mon, 21 Oct 2002 09:57:23 +0200
Received: from pop.kundenserver.de
	by localhost with POP3 (fetchmail-5.4.0)
	for monika.lueck@fwa-ffo.de (single-drop); Mon, 21 Oct 2002 10:17:32 +0200 (CEST)
Received: from [193.158.30.131] (helo=adelie)
	by mxng11.kundenserver.de with smtp (Exim 3.35 #1)
	id 183XRD-0001OB-00
	for Monika.Lueck@fwa-ffo.de; Mon, 21 Oct 2002 09:57:23 +0200
Received: from mail ([217.5.230.3]) by adelie; Mon, 21 Oct 2002 09:57:13 +0200 (MEST)
Received: from adelie (adelie [217.5.230.1])  by mail.siv.de (iPlanet Messaging Server 5.0 Patch 2 (built Dec 14 2000))  with SMTP id <0H4B000JENFDMG@mail.siv.de> for Monika.Lueck@fwa-ffo.de; Mon,  21 Oct 2002 09:57:13 +0200 (MEST)
Received: from  ([172.23.1.92]) by adelie; Mon,  21 Oct 2002 09:57:11 +0200 (MEST)
Date: Mon, 21 Oct 2002 09:57:13 +0200
From: Cordula =?iso-8859-1?Q?G=FCnther?= <Cordula.Guenther@siv.de>
Subject: HL 27241
To: Monika.Lueck@fwa-ffo.de
Message-id: <3DB3B359.2A449048@siv.de>
MIME-version: 1.0
X-Mailer: Mozilla 4.78 [de] (Windows NT 5.0; U)
X-Accept-Language: de
Content-type: multipart/mixed; boundary="=_IS_MIME_Boundary"
X-Virus-Scanned: by AMaViS perl-10

--=_IS_MIME_Boundary
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

--- SIV.AG Rostock Security Server - interested in secure network solutions ? - email: netintegration@siv.de ---

email-body was scanned and no virus found
----

--=_IS_MIME_Boundary
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: QUOTED-PRINTABLE

Sehr geehrte Frau Lueck,

leider konnte ich Sie telefonisch nicht erreichen. Den zus=E4tzlichen
Eintrag aus der Schnittstelle in die Anlagenbuchhaltung k=F6nnen Sie =
bei
erfolgreicher =DCbergabe nachlesen unter: Finance --> Anlagenbuchhalt=
ung
--> Info --> Anlage ausw=E4hlen --> Detail-Info anklicken -->
Anlagenkorrektur anw=E4hlen --> In der Form sehen sie den Zusatztext =
unter
Bemerkung.

F=FCr Fragen stehe ich Ihnen gern zur Verf=FCgung und verbleibe

mit freundlichen Gr=FC=DFen

SIV.AG

i.A.

Cordula G=FCnther
Anwendungsberaterin


--=_IS_MIME_Boundary--


---------------------- multipart/mixed attachment
<?php

/*
  
  File: config/mime.conf
  $Author: jro $
  $Revision: 1.2 $
  $Date: 2000/09/14 10:50:35 $
  
  IMP: Copyright 1998 Patrick C. Audley <paudley@blackcat.ca>
                 1999 The Horde Project <dev@horde.org>
  
  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['application/octet-stream/delivery-status'] =
array(
      'action'          => 'default',
      'view'            => true,
      'inline'          => true,
      'view_function'   => 'mime_view_text',
      'download'        => true,
      'icon'            => 'mime_mail.gif'
      );

$mime_actions['application/octet-stream/rfc822'] =
array(
      'action'          => 'default',
      'view'            => true,
      'inline'          => true,
      'view_function'   => 'mime_view_text',
      'download'        => true,
      'icon'            => 'mime_mail.gif'
      );

$mime_actions['application/pdf'] =
array(
      'action'          => 'default',
      'view'            => true,
      'inline'          => false,
      'download'        => true,
      'icon'            => 'mime_pdf.gif'
      );

/* tupy*/
$mime_actions['message/partial'] =
array(
      'action'          => 'default',
      'view'            => true,
      'inline'          => false,
      'view_function'   => 'mime_view_text',
      'download'        => true,
      'icon'            => 'mime_mail.gif'
      );

$mime_actions['message/rfc822'] =
array(
      'action'          => 'default',
      'view'            => true,
      'inline'          => false,
      'view_function'   => 'mime_view_text',
      'download'        => true,
      'icon'            => 'mime_mail.gif'
      );

$mime_actions['message/'] =
array(
      'action'          => 'default',
      'view'            => true,
      'inline'          => true,
      'view_function'   => 'mime_view_text',
      'download'        => true,
      'icon'            => 'mime_mail.gif'
      );

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

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

/* tupy*/
$mime_actions['text/richtext'] =
array(
      'action'          => 'default',
      'view'            => true,
      'inline'          => false,
      'download'        => true,
      'icon'            => 'mime_msword.gif'
      );

if (!empty($default->path_to_mswordview)) {
	$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'
      );

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


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

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


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

// .deb - Debian packages.
// Define $default->path_to_dpkg in defaults.php3.
/*
$mime_actions['application/x-debian-package'] =
array(
      'action'          => 'default',
      'view'            => true,
      'view_function'   => 'mime_view_deb',
      'download'        => true,
      'icon'            => 'mime_deb.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 and set 'override_text' to true,
// it will attempt to 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 markup (aka multipart/alternative, but we don't
// implement _quite_ that yet).

// Viewing HTML is NOT SECURE - it can open you to attack. For 
// this reason, you can *choose* to view it, but it won't display in imp at
// all unless you change the settings.

// Thus, the default is to only allow html parts to be downloadable, and not
// viewable through IMP at all. This is for security reasons; please try and
// understand those reasons before enabling any sort of HTML viewing.
$mime_actions['text/html'] =
array(
      'action'          => 'default',
      'view'            => false,
      'inline'          => false,
      'override_text'   => false,
      'view_function'   => 'mime_view_html',
      'download'        => true,
      'icon'            => 'mime_html.gif'
      );

// Allow the HTML MIME-part to be viewed in another browser window and
// downloadable. This is the safest way to read mail and
// still have HTML mail renderable, all options are open.
// THIS IS STILL A POTENTIAL SECURITY HOLE
$mime_actions['text/html'] =
array(
      'action'          => 'default',
      'view'            => true,
      'inline'          => false,
      '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).
//
// This is not secure, unfortunately, and should only be used if you
// can trust your incoming mail.
/*
$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 (mikeh@spark.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.
// 
// Unfortunately, this is not secure. Unless you only get trusted mail, (like an
// intranet, where I have my IMP), you shouldn't use this.
/*
$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'
      );
*/

?>

---------------------- multipart/mixed attachment--