If you want to use standard unix commands in a shell script, then something
like the following will do you (YMMV, this is untested, no warranty, user
serviceable parts inside, so get a screwdriver, etc):

---begin unix101.sh---

#!/bin/ksh

NUMDAYS=60 # Let's just assume approximately 2 months.

find $path_to_maildir -type f -ctime +${NUMDAYS} | xargs -n 1000 rm

---end unix101.sh---

If you only want to delete read messages, then put in $path_to_maildir/cur
instead.  Run from cron on a daily, weekly, or monthly basis.

-Peter

On Mon, Feb 14, 2000 at 08:32:29AM +0800, [EMAIL PROTECTED] wrote:
> Hi there,
> 
> I saw some discussion on 'mail aging' in the archive. The messages were dated
> Sept. '98. I am looking for method to delete all the mails sitting in the maildirs 
>for
> more than certain days and am wondering if something had really been implemented 
> after that discussion.
> 
> Thanks in advance !
> 
> -----------
> W.H.Li

-- 
The 5 year plan:
In five years we'll make up another plan.
Or just re-use this one.

Reply via email to