On Thu, Jan 18, 2007 at 11:52:58AM +1100, Sonia Hamilton wrote:
> * On Thu, Jan 18, 2007 at 10:39:03AM +1100, Dean Hamstead wrote:
> > Whatever suits your needs *shrug*, you have the flexibility
> > to do things in a way that suits you.
> > 
> > rather than deleting them all, you could just auto delete
> > emails over a certain age (expire might be a good word).
> > 
> > with mbox this would be interesting, with Maildir
> > very simple.
> 
> Here's a script I wrote Yes, script can be improved a lot :-)
> 
> #!/bin/bash
> 
> for i in z_bak:7 slug:180 sbn:28 root:14 y_spam_definite:28 ; do
>     mydir=${i%:*}
>     mydays=${i#*:}
>     echo $mydir
>     echo $mydays
>     cd /home/sonia/Maildir/.${mydir}/new
>     if [ `pwd` = /home/sonia/Maildir/.${mydir}/new ] ; then
>       echo `pwd`
>       find . -type f -atime +${mydays} -print0 | xargs -0r rm
>       find . -type f -ctime +${mydays} -print0 | xargs -0r rm
>       find . -type f -mtime +${mydays} -print0 | xargs -0r rm
>     fi
>     cd /home/sonia/Maildir/.${mydir}/cur
>     if [ `pwd` = /home/sonia/Maildir/.${mydir}/cur ] ; then
>       echo `pwd`
>       find . -type f -atime +${mydays} -print0 | xargs -0r rm
>       find . -type f -ctime +${mydays} -print0 | xargs -0r rm
>       find . -type f -mtime +${mydays} -print0 | xargs -0r rm
>     fi
> done


archivemail is your friend

> -- 
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
> 
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to