I run this from bash:
expr $(cat /home/bryantest/count) + 1 > /home/bryantest/count
Does anyone know how to put it in a procmail recipe? I just want to use the normal autoresponse, which I have pasted below this at the end. Can anyone show me how to include it?
What it does is to create a counter for every time the procmail script is run. Also, if there is a much easier way to do it I will be happy to use the better way instead.
Here is the current script from the man pages of procmailex.
SHELL=/bin/sh # for other shells, this might need adjustment
:0 Whc: vacation.lock
# Perform a quick check to see if the mail was addressed to us
# Don't reply to daemons and mailinglists
# Mail loops are evil
* !^X-Loop: firstname.lastname@example.org
| formail -rD 8192 vacation.cache
:0 ehc # if the name was not in the cache
| (formail -rI"Precedence: junk" \
-A"X-Loop: email@example.com" ; \
echo "I received your mail,"; \
echo "but I won't be back until Monday."; \
echo "-- "; cat $HOME/.signature \
) | $SENDMAIL -oi -t