Re: [exim] Filtering MIME Parts

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Peter Velan
日付:  
To: exim-users
題目: Re: [exim] Filtering MIME Parts
am 05.12.2007 17:28 schrieb Patrick Donahue:
> Thanks Peter. I tried altermime but unfortunately this can only remove
> attachments, not the multipart/alternative I'd like to remove:
>
> ------_=_NextPart_001_01C836FB.CF8C6757
> Content-Type: multipart/alternative;
>         boundary="----_=_NextPart_002_01C836FB.CF8C6757"

>
>
> ------_=_NextPart_002_01C836FB.CF8C6757
> Content-Type: text/plain;
>         charset="US-ASCII"
> Content-Transfer-Encoding: quoted-printable

>
> =20
>
> ------_=_NextPart_002_01C836FB.CF8C6757
> Content-Type: text/html;
>         charset="US-ASCII"
> Content-Transfer-Encoding: quoted-printable

>
>
> Any other ideas?


Try Perl with modules:

use MIME::Entity;
use MIME::Explode;

-- First "explode" each mime part into a single file.
As an bonus, you get nicely structured hashes of all headers.

-- Then assemble a new mail from your exploded pieces with the
module MIME::Entity.

Works great,
Peter