Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!agate!ucbvax!HPLABS.HP.COM!hpsemc!bd From: hpsemc!bd@HPLABS.HP.COM (bob desinger) Newsgroups: comp.mail.mh Subject: Re: Here's a way to expire old messages Message-ID: <8802032148.AA24647@hpsemc.HP.COM> Date: 3 Feb 88 21:48:53 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 40 > 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 is pretty good, and it lets the system do the hard part of deciding (intelligently) which messages to prune out. You can also replace the echo lines with one line of `set -x': set -x rm -f $x folder -push +deleted folder -pack folder -pop ...to get the same effect (well, nearly the same effect; you'll have a space between the first "+" and your command with the new way but not with your original.) You may also wish to add some `&&' tokens on two lines: set -x rm -f $x folder -push +deleted && folder -pack && folder -pop The double ampersand means "if this command succeeds, do the next one; if this fails, skip the other commands." (Newlines need not be quoted after the &&.) With the old way, if the `folder -push' failed, you'd pack the current folder; with the new way, the packing will occur only if you successfully pushed +deleted onto the stack. If the push fails, neither the pack nor the pop will happen. It's a small thing, though, especially because the erroneous action is not very destructive. bob desinger