procmail
[Top] [All Lists]

MIME unpacker for procmail?

1996-09-24 11:43:10

Message has been automatically signed by PGPsendmail 1.4,
available from ftp.atnf.csiro.au:pub/people/rgooch


-----BEGIN PGP SIGNED MESSAGE-----

Does anyone have a MIME unpacker recipe that will filter the message such
that attachments are just "filled in" with the expanded content?  Right now,
I'm using a hack with munpack:

TRASHDIR=/usr/tmp
PROCMAIL_MIME=mime
:0
*^content-type: multipart/mixed
{
        :0f
        |mkdir $TRASHDIR/mime.$$>&/dev/null;munpack -C $TRASHDIR/mime.$$;echo 
$TRASHDIR/mime.$$; echo ""; filesof text $TRASHDIR/mime.$$ | xargs cat
        :0:
        $PROCMAIL_MIME
}


Note that "filesof" is a script which returns a list of files in the given
directory which are only of a certain type (text in this case).  Basically,
I just want to see all text portions of the MIME message.

Note also that this technique is inadequate in that the header of the mail
message (RFC822?) is not sent to munpack, and so may not always be correct.

Maybe there is just a plain better technique where any MIME attachments can
always be just converted to text (HTML documents, MS-Word documents, etc.)?

I'm looking for any better solutions to this problem.  Thanks.

- -- 
Internet: dummy(_at_)c2(_dot_)org                   In real life: Robert Brown,
URL: http://www.c2.org/~dummy                          in sunny Berkeley, CA
   >> Capitol punishment is premeditated murder. <<    waiting for The Big One
  >> Ignorance isn't bliss -- it's good business. <<   (510) 464-4604


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQB1AwUBMkgqyTZMMbnCKCB9AQH+aQL9FkhzSj5roH6rD+af8RD+K2Y+t/K1f9G/
xuBJkx8yOexhDxCSP/B4YnKt5bVDiyAzMULOkcosM+j+dFBLo8llY5YfXwqeZfum
XqyXcidvEW7hQknck6aLIVmfz4CZEE7L
=yrAV
-----END PGP SIGNATURE-----

<Prev in Thread] Current Thread [Next in Thread>
  • MIME unpacker for procmail?, Robert <=