[Dovecot] Differences when expire plugin and cronjob?

Noel Butler noel.butler at ausics.net
Fri Jan 30 02:26:30 EET 2009


On Fri, 2009-01-30 at 09:21, Timo Sirainen wrote:

> On Jan 28, 2009, at 12:01 PM, Nicolas Letellier wrote:
> 
> > Hello.
> >
> > I would like to see the differnces between the expire plugin and a  
> > cronjob which make a find/delete.
> > Is there performances differences? What's the best to use?
> 
> find will go through all mailboxes while expire goes through only  
> those mailboxes that actually have messages that need to be deleted.
> 


(I might have what OP is trying to do wrong as I didn't seem to see the
original post)

We found it much easier to use a daily cron to clear out old crap

find /var/vmail/*/*/*/*/Maildir/{.Junk,.Trash}/ -name "*.mx*" -mtime +10
-print | /usr/bin/perl -nle 'unlink;'

(we noticed massive speed/resource improvement by piping to perl over
using finds -exec rm ...)


> > I use dovecot 1.1.8. Is expire plugin update the maildirsize and  
> > other indexes files?
> 
> Yes. And find/delete doesn't of course.


But as it is safe to manually delete messages in directories should it
not be updated the next time dovecot/deliver runs?



More information about the dovecot mailing list