procmail
[Top] [All Lists]

Re: Simple method for removing all attachments.

2002-11-12 01:58:15
On Mon, 11 Nov 2002, Nick Gray wrote:

All,

I am looking for background information on how to remove all incoming
attachments and place them in a directory. Can someone point me to a
web page or a recipe that accomplishes this.


        Rough answer, but good point to start:


LETTER=/some/where/letter
# The following variable (METAMAIL_TMPDIR) is must!
METAMAIL_TMPDIR=/some/where/dir

:0 hc
$LETTER

:0 bfw
|sed -e '/type.*multipart\/alternative/s/\/alternative/\/mixed/'|\
/usr/bin/metamail -r -y -w -q -x

:0 f
|cat $METAMAIL_TMPDIR/mm.* >> $LETTER && /bin/rm -f $METAMAIL_TMPDIR/*


        (I'll not be surprised if you find something better)

Bye,
 Udi


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail