[Dovecot] Automatic Folder Expiry (plugin?)

Troy Engel tengel at fluid.com
Fri Feb 2 19:26:58 UTC 2007

Sean Kamath wrote:
> find /home/?/????/.*/Maildir/.Junk -regex '\(cur\|new\)/.*' -type f 
> -ctime +14 -print | xargs rm -f

Close! I actually reworked it and have a good working solution, and it 
turns out xargs is much faster than -exec. The final line I have is:

find /home/*/*/Maildir/.Junk/ -regex '.*/\(cur\|new\)/.*' -type f -ctime 
+14 -print0 | xargs -0 rm -f

...which brought me down to about 1m 12sec or so, but I'm sure there's a 
lot of caching here. Regardless it's still a very nice increase!


Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com

More information about the dovecot mailing list