stacking istreams and ostreams

Philipp Brüll bruell at simiatech.com
Thu Dec 11 11:16:22 UTC 2014


Hello,

I'm developing an encryption plugin for dovecot and ran into a problem
with the stacking of i/o-streams.

The encryption i/o-streams are working fine on any kind of mail the test
suite is passing through them. But as soon as the zlib plugin is enabled
the logs show an cache error:

failed: Cached message size larger than expected (214 > 206, box=INBOX,
UID=1)

I've already double-checked the return values of ostream's sendv and
istream's read function. They seem correct (and equal).

If the order of the streams are changed (by changing the number in the
lib-filename libxx_scrambler.so); meaning that the encryption is done
before the compression (which isn't efficient) both streams are working
correct without any errors.

Is there some way the zlib plugin changes the cached message size? Is
there some behaviour of the zlib plugin that I'm missing? Any help would
be very welcome.

Best regards,
Philipp

-- 
simia.tech GbR
http://simiatech.com


More information about the dovecot mailing list