I have several recipes like the following:
:0
* LISTNAME ??^^procmail^^
{
INCLUDERC=$HOME/.sms_procmail
SWITCHRC
}
When a message is sent to the list procmail (this list), I get an SMS alert.
This is fine for lists like this one that get a low volume of mail, but I would
like to do is figure out a way within procmail to only trigger this if an SMS
hasn’t been sent in 24 hours.
The only thing I can think of is touching a file and then checking the time
stamp for the file, but that would require invoking a shell and before I go to
that I am wondering if anyone has any better ideas?
(I think something like this would work)
SMS_TIME=`find . -mtime -24h .sms_$LISTNAME`
:0
* LISTNAME ?? ^^procmail^^
{
:0
* SMS_TIME ?? ^^$LISTNAME^^
{
INCLUDERC=$HOME/.sms_procmail
`touch .sms_procmail`
SWITCHRC
}
:0E
{
<stuff>
}
}
Comments? Suggestions? Am I forgetting something stupid?
--
Traveling through hyperspace ain't like dusting crops, boy.
____________________________________________________________
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