procmail
[Top] [All Lists]

Mail backup

1997-08-13 08:25:00
Hi,

I'm using the following script to backup my mail. Then, using cron, I run
a program that automatically limits the number of messages in the backup
file. The problem is that it removes from the end and appends to the end
-- so all the old messages stay and all the new ones get removed. 

I don't care if it works with removing from the front or adding to the
front -- whatever works. Thanks.


:0Wc:Misc/Backup/lock.mail.backup.general
* ! ^X-Backup: Disable
$BACKGFILE



#!/usr/bin/sh
/usr/local/bin/lockfile $HOME/Misc/Backup/lock.mail.backup.general
cat $HOME/Misc/Backup/mail.general.backup | \
        /usr/local/bin/formail -1000s > $HOME/Misc/Backup/temp.general.backup
mv -f $HOME/Misc/Backup/temp.general.backup 
$HOME/Misc/Backup/mail.general.backup
rm -f $HOME/Misc/Backup/lock.mail.backup.general



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


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