On Thu, Dec 29, 2005 at 02:47:29PM +0800, Chris Purves wrote: > I am running courier IMAP using maildirs. I would like to know what > is the best way for removing mail from the trash folder that are older > than six months. > > Is there any functionality built into courier or should I make a cron > job? What are others doing?
Not sure how to do it with Courier. Another possibility if you can shut down courier in the middle of the night is: % /etc/init.d/courier stop % cd Maildir && find . -type f -mtime +180 -exec rm \{\} \; % /etc/init.d/courier start (test this first and understand it, because I didn't test it) That will get *any* file older than 180 days, so if there are non-email files in the tree, you'll have to get more complicated. Will that mess up the indices on courier, or will it just rebuild them? I accidentally screwed up the indices with Dovecot and it just rebuilt them without a problem. I do something similar, except I move old mail to an archive so mutt doesn't get bogged down with 10,000 messages on some of the lists. Never had a problem. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]