procmail
[Top] [All Lists]

Re: message reinjection...

2000-08-17 12:58:46
At 13:44 2000-08-17 +0200, Xander Soldaat wrote:
I am working on a little program that will take a message, rip out the mime parts that are not normal printable text and stick 'em in a directory. What

Write it as a filter, and execute it from procmail:

:0fW:
* somecondition
| your_filter_program

Your filter should output anything which is to be kept as the original message.

See 'man procmailrc'

f - treat the delivery as a filter. 'c' is an inappropriate flag in this case, since the message will continue along to other recipes after the filter stage.

W - wait for exit - if program exit code failed (nonzero), then message will be treated as if it had not been filtered. This allows your filter to just bail with an error instead of having to emit the whole original message if your conditions weren't met on closer examination.


I don't diddle with MIME stuff, but it seems there are already scripts and support apps to do this. You should check the archives.

---
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

 Sean B. Straw / Professional Software Engineering
 Post Box 2395 / San Rafael, CA  94912-2395


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

<Prev in Thread] Current Thread [Next in Thread>