Path: utzoo!mnetor!uunet!grand!day From: day@grand.UUCP (Dave Yost) Newsgroups: comp.mail.mh Subject: Here's a way to expire old messages Message-ID: <401@grand.UUCP> Date: 3 Feb 88 06:10:16 GMT Organization: Grand Software, Inc., 213-650-1089, Los Angeles, CA Lines: 45 Keywords: mh,expire,messages I've been using mh since the beginning. Here are some tips from an old hand. Early on, Jim Guyton at Rand added this refinement to the use of mh (with csh): alias rmm refile +deleted and to exponge deleted mail, this: set mh=~/Mail alias mexp 'cd $mh/deleted; rm *' More recently, I have instituted automatic exponging of my deleted messages. Every night, +deleted messages not accessed in the last 10 days are deleted, and the +deleted folder is packed. Here is the shell script that is run every night out of cron (I control my own /usr/lib/crontab): ====== #!/bin/sh # exponge from +deleted all messages not accessed in 10 days # This goes in /usr/lib/crontab # 30 5 * * * su day -c 'sh /u/day/lib/cron.sh' > /u/day/lib/cron.out 2>&1 /bin/date PATH=/u/day/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:/etc:/usr/etc export PATH USER=day export USER HOME=/u/day cd $HOME/Mail/deleted x=`find . -type f -name '[123456789]*' -atime +10 -print` echo "+rm -f $x" rm -f $x echo "+folder -push +deleted" folder -push +deleted echo "+folder -pack" folder -pack echo "+folder -pop" folder -pop ====== This has made mh life a whole lot easier for me. I hope others enjoy it. --dave yost