On 01/17/2010 12:06 PM, Leonardo Rodrigues wrote:
The 'script compress idea' from the Wiki page sais: Dovecot can now read the file, but to avoid compressing it again on the next run, you'll probably want to rename it again to include e.g. a "Z" flag in the file name to mark that it was compressed (e.g. 1223212411.M907959P17184.host,S=3271:2,SZ).
If i rename the file and add the Z flag, i will be braking the
dovecot-uidlist file, which contain the filenames without the Z flag. Users would have to download the compressed files again because the filename was changed. That on big mailboxes and slow connections (specially after the very 1st compression routine run) can be a BIG problem.
keeping the filename intact, not even adding the Z flag, would be a
great idea to avoid clients from redownloading messages ??? Compression routines would probably have to use file command to identify already compressed files, which would badly impact on the performance of its run ... not being able to identify already compressed files based on its filename would be very bad ....
I think that file name comparison is based only on the part before the ":", which identifies the message. What comes after are flags that might be set/unset independently of dovecot if another program also accesses the mail directory.
Note that it is not necessary to include the "Z" flag to prevent double compression. If you really want, you can keep the same file, just be sure in your compression script to check if files are compressed by looking at the first bytes: both gzip and bzip2 files always start with some fixed bytes.
-- The nation that controls magnetism controls the universe. -- Chester Gould/Dick Tracy
Eduardo M KALINOWSKI eduardo@kalinowski.com.br