Changing the name of a compressed file

Peter West lists at pbw.id.au
Sun Jun 11 14:46:33 EEST 2017


It looks as though there is no global mail_plugins variable.  Is this the case?  Or have I misunderstood how global variable are expressed?

P

> On 10 Jun 2017, at 9:10 pm, Peter West <lists at pbw.id.au> wrote:
> 
> Ok, I added zlib to imap protocol.
> 
> protocol imap {
>>  mail_plugins = $mail_plugins zlib
> }
> 
> Now both imap and lmtp protocols have zlib plugin enabled, and both send and receive mail is compressed.
> 
> Peter
> 
>> On 10 Jun 2017, at 6:50 pm, Aki Tuomi <aki.tuomi at dovecot.fi> wrote:
>> 
>> Please check that you are not overwriting mail plugins for lmtp. Or post your doveconf -n.
>> 
>> Aki
>> 
>>> On June 10, 2017 at 11:10 AM Peter West <lists at pbw.id.au> wrote:
>>> 
>>> 
>>> Not sure what you mean. I’m using lmtp to send messages to Dovecot from Postfix.
>>> 
>>>> On 10 Jun 2017, at 6:08 pm, Aki Tuomi <aki.tuomi at dovecot.fi> wrote:
>>>> 
>>>> What's your LDA?
>>>> 
>>>> Aki
>>>> 
>>>>> On June 10, 2017 at 11:01 AM Peter West <lists at pbw.id.au> wrote:
>>>>> 
>>>>> 
>>>>> Thanks for that Aki.
>>>>> 
>>>>> Follow-up question.  I tried to initiate compression by adding
>>>>> 
>>>>> mail_plugins = $mail_plugins zlib
>>>>> 
>>>>> plugin {
>>>>>  zlib_save_level = 6
>>>>>  zlib_save = xz
>>>>> }
>>>>> 
>>>>> 
>>>>> to dovecot.conf.  I restarted dovecot and sent one message to the server, and one message from the server.  Neither was compressed.  I changed the save type to
>>>>> 
>>>>>  zlib_save = bz2
>>>>> 
>>>>> and repeated. This time the message received (in /var/vmail/<host>/<username>/cur) was not compressed, but the message in /var/vmail/<host>/<username>/.Sent/cur was bzip2 compressed.
>>>>> 
>>>>> Why is the received mail not being compressed?  Is this the point of the discussion about compressing old mails?
>>>>> 
>>>>> 
>>>>>> On 10 Jun 2017, at 4:43 pm, Aki Tuomi <aki.tuomi at dovecot.fi> wrote:
>>>>>> 
>>>>>> 
>>>>>>> On June 10, 2017 at 5:58 AM Peter West <lists at pbw.id.au> wrote:
>>>>>>> 
>>>>>>> 
>>>>>>> Concerning Maildir, the wiki page on compression has this:
>>>>>>> 
>>>>>>> All mails must have ,S=<size> in their filename where <size> contains the original uncompressed mail size, otherwise there will be problems with quota calculation as well as other potential random failures. Note that if the filename doesn’t contain the ,S=<size> before compression, adding it afterwards changes the base filename and thus the message UID. The safest thing to do is simply to not compress such files.
>>>>>>> 
>>>>>>> Further down on the same page is this:
>>>>>>> 
>>>>>>> If the file does exist, rename() (mv) the compressed file over the original file.
>>>>>>> 	• 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).
>>>>>>> 
>>>>>>> These comments seem to contradict each. Or is there a difference between adding the size specifier to the filename and adding a Z flag to the end of the file name?
>>>>>>> 
>>>>>>> --
>>>>>>> Peter West
>>>>>>> pbw at pbw.id.au
>>>>>>> And the great throng heard him gladly.
>>>>>>> 
>>>>>> 
>>>>>> Keyword is 'base filename'. From the wiki, "The standard filename definition is: "<base filename>:2,<flags>".". Z is a flag.
>>>>>> 
>>>>>> Aki
>>>>> 
>>> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <http://dovecot.org/pipermail/dovecot/attachments/20170611/6ddda947/attachment.sig>


More information about the dovecot mailing list