Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!aurora!labrea!agate!ucbvax!gonzo.twg.COM!mrose From: mrose@gonzo.twg.COM (Marshall Rose) Newsgroups: comp.mail.mh Subject: Re: Here's a way to expire old messages Message-ID: <26615.571029877@gonzo.twg.com> Date: 5 Feb 88 03:24:37 GMT References: <820.571010155@bearcat> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: mh-users@ICS.UCI.EDU Organization: The Internet Lines: 79 What I do in my .logout is call packit >& /dev/null & which is a shell script which puts everything in a file called OUTGOING in my MH directory. Once a month I move this into my mail archives directory. /mtr #! /bin/sh : packit used to be called "packf", but "pack" got changed to that : PATH=:/bin:/usr/bin:/usr/ucb:/usr/uci:/usr/uci/lib/mh; export PATH F="" M="" N=F for A in $* do case $A in -nov*) N=F ;; -v*) N=T ;; -*) echo "packit: $A unknown" 1>&2 exit 1 ;; +*|@*) case $F in "") F=$A ;; *) echo "packit: only one folder at a time" 1>&2 exit 1 ;; esac ;; *) M="$M $A" ;; esac done case $F in "") F=+outbox ;; esac case $M in "") M=all ;; esac prf=/tmp/prf$$ ctx=/tmp/ctx$$ trap "rm -f $prf $ctx" 0 1 2 3 13 15 rm -f $prf echo "MH-Sequences:" > $prf cat ${MH-$HOME/.mh_profile} >> $prf MH="$prf" ; export MH rm -f $ctx cp ${MHCONTEXT-`mhpath +`/context} $ctx MHCONTEXT="$ctx" ; export MHCONTEXT if mhpath $F all > /dev/null; then P=`mhpath +`/OUTGOING C="packf -file $P $F $M" case $N in T) echo $C ;; esac if $C; then C="rmm $F $M" case $N in T) echo $C ;; esac if $C; then exit 0; else exit 1; fi else exit 1; fi else exit 1; fi exit 0