[Dovecot] handling filename of compressed messages

Pascal Volk user+dovecot at localhost.localdomain.org
Thu Jan 14 05:40:28 EET 2010


On 01/14/2010 03:33 AM Leonardo Rodrigues wrote:
>     i'm running dovecot 1.2.9 and, among other things, i have the zlib 
> plugin enabled. A shell script runs once a day to compresses all not 
> still compressed files on the users maildirs.
> 
>     so far so good, it works fine, there's no problem on that.
> 
> 
>     what i think is not happening 100% correctly is the following:
> 
>     1) user receives a message
> 
>     2) BEFORE the compress routine runs, filename is:
> 
> new/1263436052.V6814I43300b4M146002.correio.domain.com.br,S=238207
> 
>     3) AFTER the compress routine, filename is now:
> 
> new/1263436052.V6814I43300b4M146002.correio.domain.com.br,S=238207.gz

*PLING* And here is the problem. :-)
I've found it. May I keep it?

>>     i'm aware that dovecot doesnt need the '.gz' extension on the file 
> to recognize that as a gzipped file. Even without the .gz extension, 
> dovecot is correctly reading the file. the '.gz' is not even necessary 
> on the filename and still dovecot can handle it fine.

The .gz is only wrong in the filename

>     anyway, i would like to suggest dovecot to handle the filename to 
> keep the .gz extension, if that exists. This could help sysadmins to 
> easily identify gzipped files on the maildirs and make anything with 
> them, if that's desired.
> 
>     i would like to see dovecot changing filenames properly and keeping 
> the .gz extension always, for example
> 
> cur/1263436052.V6814I43300b4M146002.correio.domain.com.br,S=238207:2,S.gz
> instead of
> cur/1263436052.V6814I43300b4M146002.correio.domain.com.br,S=238207.gz:2,S
> 
> cur/1263436052.V6814I43300b4M146002.correio.domain.com.br,S=238207:2,RS.gz
> instead of
> cur/1263436052.V6814I43300b4M146002.correio.domain.com.br,S=238207.gz:2,RS

No, you don't wont to have such file names.

http://wiki.dovecot.org/Plugins/Zlib: … Dovecot can now read the file,
but to avoid compressing it again … include e.g. a "Z" flag in the file
name … (e.g. 1223212411.M907959P17184.host,S=3271:2,SZ)

The article links also to: http://cr.yp.to/proto/maildir.html:
…
What can I put in info?
When you move a file from new to cur, you have to change its name from
uniq to uniq:info … info starting with "2,": Each character after the
comma is an independent flag. …

In short: You want to rename
1263436052.V6814I43300b4M146002.correio.domain.com.br,S=238207
to 1263436052.V6814I43300b4M146002.correio.domain.com.br,S=238207:2,Z



Regards,
Pascal
-- 
The trapper recommends today: beeffeed.1001404 at localdomain.org


More information about the dovecot mailing list