procmail
[Top] [All Lists]

Re: Self-Modifying .procmailrc

1997-10-07 10:19:42
When I suggested,

T> If you can determine in advance what times the forwarding should start and
T> stop, you can also write a recipe based on checking the timestamp and date
T> in the From_ line; the regexp can get complicated but the method works very
T> reliably for me.

Timothy Luoma responded,

L> If the mailhost is running user-cron files, it works even easier than
L> that.  Try 'crontab -e' and see what happens.

Define "easy", Timothy.

I prefer to have my .procmailrc stay the same and let a condition that checks
the timestamp determine whether to run a recipe's action to having a cron job
move files around.  You never get a race condition if mail arrives while the
cron job is partially completed, you don't have to worry if the machine was
down when the cron job should have run (or if the cron job or the cron daemon
failed for any reason) and things got left in the wrong state, and you don't
have to worry if the cron spool was backed up and the change got made too
late to catch some important mail.

A test on the From_ line is much better for turning recipes on and off at
predetermined times than cron jobs that touch or rm signal files.  When the
times are not known in advance, we settle for the second-best way, which is
the use of signal files.

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