"Brian C. Doyle" wrote:
Here is what i have for a recipe currently.
* HB ?? ^Content-type:.*image/*
* HB ?? ^Content-type:.*video/*
I have 2 questions.
How can I condense the above so i do not have 3 separate entrees for 1
message. IE If the email is from brian(_at_)jbbent(_dot_)com and has an
video attachment move to me Else if it is from brian(_at_)jbbent(_dot_)com
not have an image or video attachment delete!
* HB ?? ^Content-type:.*(image|video)/
The second deals with taken the attachments and automatically saving them
to a directory on my computer and then delete the email. I have seen
several script but I do not understand what they were doing !!
What exactly is your question? How to do it? You could start with
what you see in:
Maybe if the munpack is successful, you can delete the body before
saving, like this:
* HB ?? Content-transfer-encoding:.*(x-uuencode|base64)
* ! ^X-Loop: *yourName(_at_)(_dot_)*YourDomain
UnpackOutput|=sed -e \
'/^Content-[Tt]ype:.*[Nn]ame=/s,[Tt]ext/,application/,' | \
munpack -C $TMPDIR 2>&1
| echo unpacked by munpack into $TMPDIR; echo "$UnpackOutput"
The above is NOT TESTED, your mileage may vary, etc.
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information. Sorry.
Collin Park Not a statement of my employer.
procmail mailing list