procmail
[Top] [All Lists]

Re: Recipe help needed

1999-09-08 16:00:40
subject: 12345
message: This is a test

I need to write a recipe that:
1. take the subject line as a variable, say $subject=12345
2. Save the message body to a file, say: test.txt
3. Run a shell command: 

runshod $subject test.txt

Ok I'll try. From reading this list I take taht this should work:

:0
* ^subject: 12345       [match your msg]
* !^FROM_DAEMON         [some safety stop]
* !^FROM_MAILER         ["]
* ^subject: \/          [put whatever stands for \/ into $MATCH]
| runshod "$MATCH" test.txt     [pipe into shell command with 2 arguments]

the [..] parts are my comments - don't put them in!!

Volker

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