procmail
[Top] [All Lists]

Re: Mail backup

1997-08-15 09:42:00
On Wed, 13 Aug 1997, David W. Tamkin wrote:

So every time a new message arrives, you'd have something like this:

   :0c:backup.lock
   | cat - backup > /tmp/backup.$$ && mv /tmp/backup.$$ backup

This works very well. Then I can just count the first 1000 messages in the
file easily and trash the rest.

which is a shell, a cat, and a mv every time a message arrives.  I think that
the few extra forks to figure out the excess over 1000 in the backup file
once per day in your cron job are less CPU work than inserting every message
at the beginning of the backup file.

While receiving the message at the fastest speed possible is of importance
-- I doubt there would be more than a [maximum] one second difference
between the two, and this one is much nicer in how it functions.

The other method required more complicated code to figure out the backup
file itself, which I didn't like. Although I'm sure it probably works
equally as well.

Thanks for the help!

 ------------------------------------------------------------------------- 
 | Brock Rozen | brozen(_at_)webdreams(_dot_)com | 
http://www.webdreams.com/~brozen | 
 ------------------------------------------------------------------------- 


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