I think I have this working:
:0
* LISTNAME ??^^procmail^^
{
SMS_TIME=`find . -mtime +24h -maxdepth 1 -name .SMS_$LISTNAME | sed
's/^.......//'`
:0
* ! 9876543210^0 SMS_TIME ?? ^^$LISTNAME^^
{
LOG="touch .SMS_$LISTNAME"
SMS_TIME=`touch .SMS_$LISTNAME`
INCLUDERC=$HOME/.sms_procmail
SWITCHRC
}
:0E
{
SWITCHRC
}
}
LISTNAME is generated in another script, based on Sean’s script to extract the
list name from a variety of headers.
I know find is expensive, but the whole point of this is to alert me when there
is a new post in a group that gets few posts, but not to alert me to every
single post in case a thread gets activity for a day or two, so in theory these
find’s should be firing quite rarely. One list, for example, I haven’t gotten
posts from since early this year, but I don’t want to miss them.
If I have the logic right then if the find doesn’t match a file (either because
the file is less than 24 hours old or because it does not exist) the file will
be touched, the SMS notification script will load, and the script will pop
back; otherwise if the file exists and is less than 24 hour hours old the
script will simply pop back.
--
How do I set my laser printer to "STUN"?
____________________________________________________________
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