# If file does not exist then create file and forward to pager
:0 iE
{
* ? test ! -f /tmp/file
| touch /tmp/file
:0
! pager(_at_)domain(_dot_)com
}
There is your error. No ":0" at the start of the nested
brace's first recipe.
As I had written:
Maybe a recipe doesn't start with ":0".
Dallman
Ok my appologies. I copy and pasted from a previous email. This is actually
what I have in .procmailrc with the names changed to protect the innocent. :)
SHELL=/usr/bin/sh
PMDIR=$HOME/procmail
LOGFILE=$PMDIR/pmlog
tempfile=$HOME/nopager
## LOG="
### "
## Set VERBOSE to yes when debugging; VERBOSE default is no
### VERBOSE=yes
#
#
# pager on 1st notification and set to not pager until a Recovery notice is
received.
:0
* ^Subject:.*PROBLEM alert - server123 is CRITICAL
{
# If file exists then forward to nopager
:0
* ? test -e $tempfile
! nopager(_at_)domain(_dot_)dom
# If file does not exist then create file and forward to pager
:0
| touch $tempfile
:0
! pager(_at_)domain(_dot_)dom
}
# Received Recovery, remove tmp file and forward to pager
:0
* ^Subject:.*RECOVERY alert - server123 is OK
{
:0
| rm -f $tempfile
:0
! pager(_at_)domain(_dot_)dom
}
# Forward the rest to pager
:0
! pager(_at_)domain(_dot_)dom
-george
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail