[Dovecot] Zlib plugin dovecot 2.0beta4

Alex Baule alexwbaule at gmail.com
Wed May 26 19:41:42 EEST 2010


Mostrar romanização
The extra line added to the header is to maintain compatibility with
SMTP(share library code), which already works well. Besides having other
benefits that are due to the hash in the header.

I tried accessing the same way that istream is done in the zlib (
zlib_permail_get_stream ), where the reference to mail-> uid == 0, (nonzero
is to read the file -> dovecot).


if (imail->data.stream != NULL || (_mail->uid == 0 && zuser->disable_uis ==
1)) { //disable_uis ir read like the zlib_save variable , if is not present
, we don't need to get stream, and works like no modifications.
      return zmail->super.get_stream(_mail, hdr_size, body_size, stream_r);
}else if (imail->data.stream != NULL || _mail->uid == 0 ) { // OK, its a
istream from received email.
      input = imail->data.stream;
      imail->data.stream = i_stream_create_emx(input);
}



But I do not know if it is correct.

If you can tell me where is exactly the way or the point that i must catch
the istream input, i do the rest.....

Tks Timo !




2010/5/26 Timo Sirainen <tss at iki.fi>

> On Tue, 2010-05-11 at 16:41 -0300, Alex Baule wrote:
>
> > 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, that is the size of email.
> > There is a way to increase this Flags ?  I need to put one more line in
> the
> > header, to have some link to body.
>
> So you want to add one header and have the S/W increase the number? The
> problem isn't only the S/W, it's also that Dovecot saves the message
> size to cache file. The only good way to solve this is to change your
> input stream to return the header, so that all of Dovecot's internal
> code sees it and internally adds them to the S/W/cache.
>
> But do you really even need a header for the link? Maybe you could just
> use IMAP UID number? Like if you have ~/Maildir/.foo/cur/abcd:2, file
> with UID=200, its body could be in e.g. ~/Maildir/.foo/body/200.
>
>
>


More information about the dovecot mailing list