On Wed, Jan 07, 1998 at 11:45:47PM +0200, era eriksson wrote:
2. Reliable but somewhat heavy
Get a real MIME decoder and let it do the work for you. See the
comp.mail.mime FAQ for pointers (you want part 6, if memory
serves)
MIME isn't a terribly complicated format but you will shoot yourself
in the foot sooner or later if you try a simplistic sed script, and
it's already been done for you in Perl. From a mail processing
standpoint, a compiled MIME decoder written in C is probably going to
be a lot more efficient than any Perl solution, so you might want to
look at munpack and friends instead of the Perl implementations.
I just did. Downloaded munpack. From the man page:
DESCRIPTION
The munpack program reads each RFC-822 message filename and
writes all non-text MIME parts or split-uuencoded files as
files. If no filename argument is given, munpack reads from
standard input.
As I understand it, it will spit out the various MIME parts into files.
How exactly do I use this to delete unwanted MIME attachments of a
specified type, auto-convert them to text/plain, etc?
Specifically, I would appreciate help on using munpack with procmail to
delete unwanted attachments.
Thanks,
Vikas