procmail
[Top] [All Lists]

Re: Run scr after all mail retrieved

1999-06-02 22:03:57
Replying to message of 02 Jun 1999 17:41:36 -0700
        from Harry Putnam <reader(_at_)newsguy(_dot_)com>
        regarding ``Re: Run scr after all mail retrieved''
        
I'm not sure of the full sequence of events but I call fetchmail to
retrieve mail.  If I put that call in a wrapper that waits for it to
finish and then calls the cleanup, would procmail still be running?
ie does fetchmail close down before procmail finishes its work?

Sounds easy enough to test.

#!/bin/sh

fetchmail && echo "fetchmail done at `date`"

exit 0

and compare the date with the time-stamp of your procmail log? (You might  
even put a time stamp into .procmailrc for the time being, such as

TESTDATE=`date`

LOG="

Local time is $TESTDATE

"

but don't leave it in longer than you have to, since it runs another process  
for each mail message

Is there an argument to fetchmail to make it not fork to the background?



At risk of showing the true depths of my ignorance:
Maybe put  a wrapper around sendmail itself.  Something like
symlinking `sendmail' to a wrapper script like?

#! /bin/sh
sendmail  && cleanup-script

I (personally) wouldn't try that until everything else had been exhausted.

TjL



<Prev in Thread] Current Thread [Next in Thread>