procmail
[Top] [All Lists]

Re: The Safe backup in procmailex

1997-06-01 05:38:00
Brock Rozen har Jun  1, ytret følgende ord om ,,Re: The Safe backup in 
procmailex'':
: On Fri, 30 May 1997, era eriksson wrote:
: > how about saving the day's or week's messages to a temporary file and
: > then run a daily/weekly cron job to merge in the new file and keep the
: > 1750 newest messages? 
: 
: It's a great idea -- but now I'm worried about one thing. What if, during
: the crontab job -- a new message is written to the daily file?

Use lockfile(1) then, to create a file the same name as the lockfile,
and then rm -f it when you have messed around your folders as you please.
e.g.
  lockfile ${HOME}/Mail/folder.lock
  ###
  ### Clean up script
  ###
  rm -f ${HOME}/Mail/folder.lock



-- 
:-- Hans Georg           --- student of 'Life, the Universe and Everything'
<georg(_at_)ii(_dot_)uib(_dot_)no>  (stud.oecon. stud.scient.)  
http://www.ii.uib.no/~georg/

,Studenter, ta fri, det er vår !'

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