[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: archive alias mail?
- From: "Anthony E. Greene" <agreene pobox com>
- To: redhat-list redhat com
- Subject: Re: archive alias mail?
- Date: Wed, 01 Mar 2000 16:10:28 +0100
At 18:09 2000-03-01 +1100, David Taylor wrote:
>I have 3 aliases, each of which I'd like to archive. The aliases are
>specified in /etc/aliases, of course. I'd like to be able to maintain
>an archive for each of these that I can compress and store on a weekly
>basis.
Create aliases like this:
redhat-list: redhat-list,/home/username/redhat-list.txt
gnome-list: gnome-list,/home/username/gnome-list.txt
balsa-list: balsa-list,/home/username/balsa-list.txt
Each destination file needs to be writable by the 'mail' user. Just make it
660 with group 'mail'. Then have cron run a script like this:
cd $HOME
for mailfile in redhat-list.txt gnome-list.txt balsa-list.txt
do
currdate=`date -d today +%Y-%m-%d`
newname=`echo -n $mailfile.$currdate`
cp $mailfile $newname
cat /dev/null > $mailfile
ls -l mailfile*
done
Tony
--
Anthony E. Greene <agreene pobox com>
Homepage and PGP Key: <http://www.pobox.com/~agreene/>
If it's too good to be true, it's probably Linux
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]