On 17.6.2005, at 02:50, Curtis Maloney wrote:
Xavier Beaudouin wrote:
Well i the "compressed" maildir system can add a check to see if file is > to FS block size... then try to compress it..
In my original post I suggested a cron job compress the files, so it's easy to vary which files get compressed, and when. Something like (untested, and pre-coffee):
find $MAILPATH ! -name "*.gz" -type f -atime +90 -size +1 -exec /usr/bin/gzip -9 {} ";"
The filename shouldn't change or Dovecot treats it as a new maildir file. The safest way would be something like:
touch dovecot-uidlist.lock gzip -9 cur/$name > tmp/$name mv tmp/$name cur/$name rm dovecot-uidlist.lock
The uidlist lock is needed so that filenames aren't renamed while compressing. Otherwise you could end up with two same basenames, one compressed and one uncompressed. That won't work very nicely.
And IMHO I think it should be a good idea to add/merge the patch into main stream code (with a flag to allow compressed maildir)...
I certainly wouldn't object, and it sounds like Andrey and others like the idea, too.
It's getting a bit difficult to decide what are plugins and what are not :)
Plugins wouldn't necessarily have to be even dynamically loadable. It could be possible to just have some plugins/builtin/ directory and Dovecot would compile everything in it inside the binary.