summi: Gute Möglichkeit den Email vom Rawheader zu befreien?

Beitrag lesen

Moin Ihres.

Ich versuche gerade mittels einer Programmiersprache (im aktuellen Fall php) einen String der eine Komplette Email mit weiteren, angehängten Emails Darstellt, von seinem Header zu befreien und an die reinen Textnachrichten zu kommen. Hat da jemand eine Idee und kann mir helfen. Habe es mir regulären ausdrücken probiert doch die führen nicht zu einem guten Ergebnis.

Hier mal einen Beispiel:

Return-Path: xxx.xxxx@xxx.xxxx.de
X-Original-To: spam@xxx.xxx.de
Delivered-To: spam@xxx.xxx.de
Received: from cartman.xxx.xxxx.de (cartman.xxx.xxxx.de [193.189.247.191])
 by rhino.xxx.xxx.de (Postfix) with ESMTP id 47477141ED60
 for spam@xxx.xxx.de; Wed, 20 Jun 2007 11:18:38 +0200 (CEST)
Received: from localhost (localhost.localdomain [127.0.0.1])
 by cartman.xxx.xxxx.de (Postfix) with ESMTP id CF749964A9
 for spam@xxx.xxx.de; Wed, 20 Jun 2007 11:18:37 +0200 (CEST)
Received: from cartman.xxx.xxxx.de ([127.0.0.1])
 by localhost (cartman [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 11896-06 for spam@xxx.xxx.de;
 Wed, 20 Jun 2007 11:18:36 +0200 (CEST)
Received: from chefkoch.xxx.xxxx.de (chefkoch.xxx.xxxx.de [87.188.167.245])
 by cartman.xxx.xxxx.de (Postfix) with ESMTP id 02A2C97CDF
 for spam@xxx.xxx.de; Wed, 20 Jun 2007 11:18:35 +0200 (CEST)
Subject:
Date: Wed, 20 Jun 2007 11:16:03 +0200
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="----_=_NextPart_001_01C7B31B.9EDF5840"
Message-ID: D8F9038B8188AB4686A5C04BFF163C1417C3C3@chefkoch.hq.xxx.xxxx.de
X-MS-Has-Attach:
Content-class: urn:content-classes:message
X-MS-TNEF-Correlator:
X-MimeOLE: Produced By Microsoft Exchange V6.5
Thread-Index: AcezG5/Plcqgw9x/RTCpSmVqK8vDow==
From: =?iso-8859-1?Q?xxx.yyy?= xxx.xxxx@xxx.xxxx.de
To: spam@xxx.xxx.de
X-ST-MF-Message-Resent: 20.06.2007 11:16
X-Scanned: by xxx.xxxx AMaViS at cartman.xxx.xxxx.de
X-Virus-Status: CLEAN
X-Virus-Scanner: ClamAV 0.90.3/3477/Wed Jun 20 08:47:18 2007 on xxx.xxx.DE
X-Spam-Status: SPAM (7.8/4.6)
X-Spam-Scanner: SpamAssassin on xxx.xxx.DE

This is a multi-part message in MIME format.

------_=_NextPart_001_01C7B31B.9EDF5840
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

[text text text text text text text text text text text text ]

------_=_NextPart_001_01C7B31B.9EDF5840
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit

Received:  from cartman.xxx.xxxx.de ([193.189.247.191]) by chefkoch.xxx.xxxx.de with Microsoft SMTPSVC(5.0.2195.6713); Wed, 20 Jun 2007 03:53:25 +0200
Received:  from localhost (localhost.localdomain [127.0.0.1]) by cartman.xxx.xxxx.de (Postfix) with ESMTP id C1A02964A2 for xxx.xxxx@xxx.xxxx.de; Wed, 20 Jun 2007 03:55:54 +0200 (CEST)
Received:  from cartman.xxx.xxxx.de ([127.0.0.1]) by localhost (cartman [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 24438-10 for xxx.xxxx@xxx.xxxx.de; Wed, 20 Jun 2007 03:55:54 +0200 (CEST)
Received:  from juno.com (unknown [218.16.123.185]) by xxx.xxxx.de (Postfix) with SMTP id 350BE97CDF for xxx.xxxx@xxx.xxxx.de; Wed, 20 Jun 2007 03:55:50 +0200 (CEST)
Content-class: urn:content-classes:message
MIME-Version: 1.0
Subject: [SPAM] Ihr Plasma an der Wand
Content-Type: multipart/related;
 boundary="----_=_NextPart_002_01C7B2DD.CBC9C260";
 type="multipart/alternative"
Date: Wed, 20 Jun 2007 04:33:46 +0200
Message-ID: 66EA2356.91AD982B@juno.com
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
X-MimeOLE: Produced By Microsoft Exchange V6.5
Thread-Topic: [SPAM] Ihr Plasma an der Wand
Thread-Index: Acey3cvJNRBLHA3jTG+YH9+3tNMTiA==
From: "Harrer" Sachso@juno.com

To: =?Windows-1252?Q?xxx.yyy?= xxx.xxxx@xxx.xxxx.de
Reply-To: "Harrer" Sachso@juno.com

This is a multi-part message in MIME format.

------_=_NextPart_002_01C7B2DD.CBC9C260
Content-Type: multipart/alternative;
 boundary="----_=_NextPart_003_01C7B2DD.CBC9C260"

------_=_NextPart_003_01C7B2DD.CBC9C260
Content-Type: text/plain;
 charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

[viiiiiiiiiiiiiiiiiiiel zu viiiiiiiiiiiiiiiiiel text um ihn hier auszugeben]

------_=_NextPart_003_01C7B2DD.CBC9C260
Content-Type: text/html;
 charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

[gaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanz viel text bzw. hier sogar html]

------_=_NextPart_003_01C7B2DD.CBC9C260--

------_=_NextPart_001_01C7B31B.9EDF5840--

--