Hello
Thank you for a tip. As I am using AIX, so I had to find munpack sources and
compile them. It is working fine.
As I understood - this can't be done clean only with procmail inside
features ?
With best regards
Martynas
----- Original Message -----
From: "Gary Funck" <gary(_at_)intrepid(_dot_)com>
To: <procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE>
Sent: Friday, March 05, 2004 5:52 PM
Subject: RE: How to list all attached files ?
From: Martynas Buozis
Sent: Thursday, March 04, 2004 2:50 PM
How I can in simple way list all filenames for attachements in email
when
there are more than one attachment?
I'd take a look at munpack.
:0
* ^Content-Type:[ ]*multipart/mixed
{
TMPDIR=`mktemp -d munpack-XXXXXX`
TRAP="rm -rf $TMPDIR; $TRAP"
:0
ATTACH_INFO=|munpack -C $TMPDIR -q
#Now, do something with $ATTACH_INFO
}
Here's what ATTACH_INFO might look like:
% munpack -q -C $TMPDIR < dg.txt
munpack: reading from standard input
FredSmith.vcf (text/x-vcard)
Worksheet.xls (application/vnd.ms-excel)
Or you add the -t switch to pull out text parts as well:
% munpack -q -t -C $TMPDIR < dg.txt
munpack: reading from standard input
part1 (text/plain)
FredSmith.vcf (text/x-vcard)
Worksheet.xls (application/vnd.ms-excel)
----
The script above is just a sketch, and hasn't been tested.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail