On 2016-03-10 15:00, Alessio Cecchi wrote:> Il 10/03/2016 10:38, Tom Sommer ha scritto: >> I enabled zlib compression, so new mails are saved compressed. >> >> Now I want to convert the old mails to gzip with the find and gzip >> command, but now I don't know which files are already gzip compressed >> by >> dovecot. > > Simple check if the file is already compress (es. if gzip -t > "${MAILFILE}" 2> /dev/null".Thanks. I worked around it with `file`.>> Shouldn't zlib_save itself add Z to the Maildir flags? As suggested in >> the compress guide on http://wiki2.dovecot.org/Plugins/Zlib ? >> > > No, zlib plugins only compress email without chaning the name.I know, I'm suggesting it _should_ change the Maildir flag.> I suggest to do not use script that rename email files because they > can invalid the uidlist.I don't think adding a Maildir flag does that. If it does, then the wiki should be changed. // Tom
Il 10/03/2016 15:33, Tom Sommer ha scritto:> On 2016-03-10 15:00, Alessio Cecchi wrote: >> Il 10/03/2016 10:38, Tom Sommer ha scritto: >>> I enabled zlib compression, so new mails are saved compressed. >>> >>> Now I want to convert the old mails to gzip with the find and gzip >>> command, but now I don't know which files are already gzip compressed by >>> dovecot. >> >> Simple check if the file is already compress (es. if gzip -t >> "${MAILFILE}" 2> /dev/null". > > Thanks. I worked around it with `file`.I suggest to use "gzip -t" for test if an email is already compress, with file I found some unrecognized compress email, a real example: # file 1424615175.M471013P18835.pop04.domain.com\,S\=3982\,W\=4097\:2\,S 1424615175.M471013P18835.pop04.domain.com,S=3982,W=4097:2,S: Minix filesystem, V3, 6762 zones # gzip -t 1424615175.M471013P18835.pop04.domain.com\,S\=3982\,W\=4097\:2\,S # echo $? 0 -- Alessio Cecchi Postmaster @ http://www.qboxmail.it https://www.linkedin.com/in/alessice
On 2016-03-10 16:06, Alessio Cecchi wrote:> Il 10/03/2016 15:33, Tom Sommer ha scritto: >> On 2016-03-10 15:00, Alessio Cecchi wrote: >>> Il 10/03/2016 10:38, Tom Sommer ha scritto: >>>> I enabled zlib compression, so new mails are saved compressed. >>>> >>>> Now I want to convert the old mails to gzip with the find and gzip >>>> command, but now I don't know which files are already gzip >>>> compressed by >>>> dovecot. >>> >>> Simple check if the file is already compress (es. if gzip -t >>> "${MAILFILE}" 2> /dev/null". >> >> Thanks. I worked around it with `file`. > > I suggest to use "gzip -t" for test if an email is already compress, > with file I found some unrecognized compress email, a real example: > > # file > 1424615175.M471013P18835.pop04.domain.com\,S\=3982\,W\=4097\:2\,S > 1424615175.M471013P18835.pop04.domain.com,S=3982,W=4097:2,S: Minix > filesystem, V3, 6762 zones > > # gzip -t > 1424615175.M471013P18835.pop04.domain.com\,S\=3982\,W\=4097\:2\,S > # echo $? > 0Duly noted, thanks :)