Hi
I am trying to figure out how I could do the following when I received
email:
1) get the name of the sender
2) check how many times the sender sent me email before, by checking in a
in a file. The format is
address1
address2
address3
address2
address1
[etc]
3) if the number of times the name is in the file is lower that a MAXIMUM,
process
the mail, if not bounce the mail back.
What I have so far is
to get the sender address
FROM="'$FORMAIL -rx To:'"
which get FROM=address, and this work
then to check I would assume that
COUNT="egrep -c "$FROM" $LIST"
would set COUNT to the number of times that FROM was found in the file LIST,
ex COUNT=3. This does not work.
I think the next step would be to compare COUNT to MAXIMUM, but then I would
need
ideas how to do this.
If there are suggestions,, I would reaaly appreciated, and I thank in
advance replys.
Danielle
ah773(_at_)yfn(_dot_)ysu(_dot_)edu