24 Dec
2011
24 Dec
'11
5:20 p.m.
I've just enabled zlib for our users, and am looking at how to compress the existing files. The routine for doing this at http://wiki2.dovecot.org/Plugins/Zlib seems a bit complicated. What do you think about simply doing:
find /var/vmail -type f -name "*,S=*" -mtime +1 -exec gzip -S Z -6 '{}' +
I.e. find all maildir-files:
- with size in the name ("*,S=*")
- modified before I enabled zlib plugin
- compress them
- add the Z suffix
- keep timestamps (gzip does that by default)
It's of course racy without the maildirlock, but are there any other problems with this approach ?
-jf