[Dovecot] feature request - zlib compression via LDA

J.P. Trosclair jptrosclair at judelawfirm.com
Fri Jun 5 01:22:16 EEST 2009


Timo Sirainen wrote:
> On Thu, 2009-06-04 at 17:05 -0500, J.P. Trosclair wrote:
>> Timo Sirainen wrote:
>>> On Thu, 2009-06-04 at 16:52 -0500, J.P. Trosclair wrote:
>>>> Any chance of getting compression support via the zlib plugin for
>>>> dovecot deliver in future versions?
>>> Sure, if someone implements it. For me it's a very low priority.
>>
>> Understood, was also wondering if a patch would be taken upstream for
>> such a feature, that answers that.
>
> I can give a few implementation hints:
>
> With v1.2 you should be able to do this completely in a plugin, because
> maildir saving keeps the output stream in struct
> mail_save_context.output. You could hook into mailbox.save_begin() where
> you'll first call the super.save_begin() and then replace the created
> output stream with a zlib_ostream, which you'll need to implement.
> Currently the only implemented output stream is src/lib/ostream-file.c.
>
> Actually it sounds like it would be pretty easy to implement after the
> zlib_ostream is done. I thought it would have been more complex. :)


Thanks for the tips. I think compression via deliver is a much more 
elegant approach compared to a cron script. I also think such an 
implementation is less prone to error. With that said, I'm gonna start 
looking into it tonight and I'll probably be back in touch with 
questions. :)





More information about the dovecot mailing list