Hello,
I am beginning in procmail, and I have a few basic questions.
1) I have a rule file containing :
#------------------------------------------------------
#VERBOSE=off
SHELL = /bin/tcsh
PMDIR=$HOME/.procmail
#MAILDIR=$HOME/Mail
MAILDIR=$PMDIR
LOGFILE=$PMDIR/log
#DEFAULT=$HOME/Mail/default
DEFAULT=$PMDIR/default
FOUND
:0 c:
* (^TO|^From.*)johnny
johnny
:0A
{ FOUND="$FOUND johnny" }
:0 c:
* (^TO|^From.*)babe
babe
:0A
{ FOUND="$FOUND babe" }
:0
|cat $FOUND >> found.list
#------------------------------------------------------
Now, I intend to do various processing on the value of FOUND,
but first, I would like to see what it contains. As you see,
I wanted to copy the contents of FOUND to a file. Obviously,
I am doing it wrong, for no file `found.list' is created.
(I am not a shell guru.) Can somebody tell me what simple
action I should take to see if FOUND behaves as I want it ?
2) Second question : for a given mail, I want to extract the
To: field and the Cc: field and put them in an environment variable.
How do I do it ?
3) Next, given an environment variable, say FOUND, I want to call
a program on it, say `myprogram'. Assume that this program is written
and that it outputs a string. I want the new value of FOUND to
be the value of
myprogram $FOUND
How would I do this ?
Thanks very much in advance,
Denis Roegel