Re: [Dovecot] zlib Plugin Dovecot 2.0 - ostream

2010-05-03 Thread Alex Baule
Hi Timo... I made the plugin like you say. The header part is saved by dovecot, with o_stream_send , and the body with my function. This implementation, works fine. But i need to get / change some values to create the "link" from header to body. When a email is saved, have the S an W flags, th

Re: [Dovecot] zlib Plugin Dovecot 2.0 - ostream

2010-04-22 Thread Alex Baule
Hi Timo I'm doing the plugin based on what you said. But I'll add a line in the message header, so the S and W (size of email) flags, on the file name has to be changed ... There is a way to do that in the plugin? 2010/4/20 Alex Baule > If I had the file descriptor, I will reuse my fun

Re: [Dovecot] zlib Plugin Dovecot 2.0 - ostream

2010-04-20 Thread Alex Baule
If I had the file descriptor, I will reuse my functions to do this, made in a separate library, that i use in the MTA. So no need to rewrite again the part of split the message. 2010/4/20 Timo Sirainen > You should write the message header to the ostream that you get, and > message body to so

Re: [Dovecot] zlib Plugin Dovecot 2.0 - ostream

2010-04-20 Thread Timo Sirainen
You should write the message header to the ostream that you get, and message body to some other file that you create. Use the o_stream_send() function to write the message header to the ostream (which does basically the same as write(fd)). I don't see how getting the stream's fd would help with any

Re: [Dovecot] zlib Plugin Dovecot 2.0 - ostream

2010-04-20 Thread Alex Baule
Because my plugin will separate the body of the message header. With the FD I have control over the message to separate it. Do you have any suggestions for this separation? I do not quite understand how the struct ostream works. Tks Timo. 2010/4/20 Timo Sirainen > On Tue, 2010-04-20 at 11:

Re: [Dovecot] zlib Plugin Dovecot 2.0 - ostream

2010-04-20 Thread Timo Sirainen
On Tue, 2010-04-20 at 11:40 -0300, Alex Baule wrote: > There is a way to get the file descriptor from output used in ostream zlib > plugin ? No. Why do you need it? You should be writing to ostream, not to its fd. signature.asc Description: This is a digitally signed message part

Re: [Dovecot] zlib Plugin Dovecot 2.0

2010-04-16 Thread Timo Sirainen
On 16.4.2010, at 19.15, Alex Baule wrote: > This iov is every line from the new emaill to save ? > > Or this is a email block with X bytes ? > > In my function to write email, i split the email by \n, to save it splited, > and if the iov is splited by \n, is good for me. You can't assume anythi

Re: [Dovecot] zlib Plugin Dovecot 2.0

2010-04-16 Thread Alex Baule
Ok ! That's easy. In the sendv rewrite, have this: for (i = 0; i < iov_count; i++) { if (o_stream_emexis_send_chunk(emexis_stream, iov[i].iov_base, iov[i].iov_len) < 0) return -1; bytes += iov[i].iov_len; } This iov is every line from the

Re: [Dovecot] zlib Plugin Dovecot 2.0

2010-04-16 Thread Timo Sirainen
On Fri, 2010-04-16 at 18:34 +0300, Timo Sirainen wrote: > On Fri, 2010-04-16 at 09:55 -0300, Alex Baule wrote: > > > Part of reading I already migrated, only that the piece of writing (the new > > part in the plugin) I need to understand some things about the operation in > > order to migrate and

Re: [Dovecot] zlib Plugin Dovecot 2.0

2010-04-16 Thread Timo Sirainen
On Fri, 2010-04-16 at 09:55 -0300, Alex Baule wrote: > Part of reading I already migrated, only that the piece of writing (the new > part in the plugin) I need to understand some things about the operation in > order to migrate and redo the same functions with the separation of body / > header So

Re: [Dovecot] zlib Plugin Dovecot 2.0

2010-04-16 Thread Alex Baule
Thanks Timo, I have another question about the plugin. Part of reading I already migrated, only that the piece of writing (the new part in the plugin) I need to understand some things about the operation in order to migrate and redo the same functions with the separation of body / header Can you

Re: [Dovecot] zlib Plugin Dovecot 2.0

2010-04-16 Thread Timo Sirainen
On Fri, 2010-04-09 at 11:42 -0300, Alex Baule wrote: > I developed a plugin based on the zlib plugin, but want to port it to > dovecot 2.0. > > There are some differences in the 2.0 plugin, which I did not quite > understand how it works for me to readjust it in my plugin. I don't think you need

Re: [Dovecot] zlib Plugin Dovecot 2.0

2010-04-09 Thread Alex Baule
Hi Paschal You do not understand what I want. I developed a plugin based on the zlib plugin, but want to port it to dovecot 2.0. There are some differences in the 2.0 plugin, which I did not quite understand how it works for me to readjust it in my plugin. As in the source code there are not ma

Re: [Dovecot] zlib Plugin Dovecot 2.0

2010-04-09 Thread Alex Baule
Hi Paschal You do not understand what I want. I developed a plugin based on the zlib plugin, but want to port it to dovecot 2.0. There are some differences in the 2.0 plugin, which I did not quite understand how it works for me to readjust it in my plugin. As in the source code there are not ma

Re: [Dovecot] zlib Plugin Dovecot 2.0

2010-04-09 Thread Pascal Volk
On 04/09/2010 02:45 PM Alex Baule wrote: > I Dont want the configuration. > > I Want know how is implemented. > > Explain, the functions, the hooks to get write a email > > stuffs like this. How it is implemented: http://hg.dovecot.org/dovecot-2.0/file/tip/src/plugins/zlib Regards, Pascal

Re: [Dovecot] zlib Plugin Dovecot 2.0

2010-04-09 Thread Alex Baule
I Dont want the configuration. I Want know how is implemented. Explain, the functions, the hooks to get write a email stuffs like this. 2010/4/8 Alex Baule > Hi Everyone > > Someone can explain to me the difference from zlib 1.2.X and 2.0 beta4 ?? > > In zlib from 2.0 beta4, Which par

Re: [Dovecot] zlib Plugin Dovecot 2.0

2010-04-08 Thread Pascal Volk
On 04/08/2010 04:56 PM Alex Baule wrote: > Hi Everyone > > Someone can explain to me the difference from zlib 1.2.X and 2.0 beta4 ?? > > In zlib from 2.0 beta4, Which part of the plugin is responsible for write > the compressed message ? > For reading compressed files you will need to enabl