Xref: utzoo comp.mail.misc:3622 comp.unix.questions:23536 Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!ogicse!schaefer From: schaefer@ogicse.ogc.edu (Barton E. Schaefer) Newsgroups: comp.mail.misc,comp.unix.questions Subject: Re: Handling old mail Message-ID: <10338@ogicse.ogc.edu> Date: 5 Jul 90 01:57:12 GMT References: <1990Jul3.130104.18250@dircon.uucp> Organization: Oregon Graduate Institute (formerly OGC), Beaverton, OR Lines: 27 In article <1990Jul3.130104.18250@dircon.uucp> sys0001@dircon.uucp () writes: } Can anyone suggest a program which will handle the ageing of mail? } } What I'm looking for is a program which looks at a user's mailbox file } (in /usr/spool/mail) and transfers all messages older than, say, a month } to a specified file in the user's own home directory. If you have Mush, you write a script: # Change home directory to match spool file set home = "~$thisfolder:t" # Collect the mail and save it to AGEDMAIL file pick -ago -1 month | save $home/AGEDMAIL # Update the folder and exit quit And then you invoke it thus: mush -n! -u username -F agedmail-script (or verbosely: mush -noinit! -user username -source agedmail-script for you Sun folks). This must be run by root to work successfully. -- Bart Schaefer schaefer@cse.ogi.edu