On Tue, May 08, 2001 at 01:09:39PM +0200, Clemens Hermann wrote:
> Hi,
> 
> quite a while ago I read about a script that checks a maildir and
> deletes any mail that is older than a specified time (e.g. 30 days).
> I can not find it anymore :-(.

Take mine for example...

#!/bin/sh

cd ~/lists
for dir in `find . -maxdepth 2 -type d -name cur`; do
  archive=`echo $dir | sed 's/.*\/\(.*\)\/.*/\1/'`
  echo $archive
  for file in `find $dir -ctime +14`; do
    mv $file ~/archive/$archive/
  done;
done;


-- 
* Henning Brauer, [EMAIL PROTECTED], http://www.bsws.de *
* Roedingsmarkt 14, 20459 Hamburg, Germany               *
Unix is very simple, but it takes a genius to understand the simplicity.
(Dennis Ritchie)

Reply via email to