I've got several mbox format mailboxes I want to archive monthly.  I've come up with 
the following shell script to run from cron, but I'm not sure there isn't a better way 
to go about this.  Here's the script..

        #!/bin/sh
        maildir=/home/graffix/mail
        for x in $maildir/lug $maildir/support $maildir/mutt-users $maildir/procmail
            do tar czfp $x-`date '+%m-%Y'`.tar.gz $x ; cp /dev/null $x
        done


My main concern is that mutt might be in the process of writing to a mbox when cron 
fires off the script.  I'm guessing that could create some problems and possibly even 
lost email.  Anyone have a better suggestion?

Dan

Reply via email to