]> git.g-eek.se Git - interimap.git/commit
Add support for the Binary Content extension [RFC3516].
authorGuilhem Moulin <guilhem@fripost.org>
Wed, 9 Sep 2015 14:05:36 +0000 (16:05 +0200)
committerGuilhem Moulin <guilhem@fripost.org>
Wed, 9 Sep 2015 20:05:43 +0000 (22:05 +0200)
commit1abb196660516f85b2ec13673aa28e6cf8a24b41
treeeba2ac643901362f0272baa65d467d24bda9df26
parent9fb0576765624cc27a1c06aebc9f4ef5df31ba30
Add support for the Binary Content extension [RFC3516].

Unfortunately as of Debian Wheezy it doesn't work for Dovecot with
COMPRESS=DEFLATE [RFC4978] and non-synchronizing literals.

    perl -e 'use Compress::Raw::Zlib;
             print "a COMPRESS DEFLATE\r\n";
             sleep 1;
             my $d = new Compress::Raw::Zlib::Deflate( -WindowBits => -15 );
             $d->deflate("b APPEND TRASH ~{1+}\r\nx\r\n", my $buf);
             print $buf;
             $d->flush($buf, Z_SYNC_FLUSH);
             print $buf;
             sleep 1;
    ' | /usr/lib/dovecot/imap
    imap(guilhem): Panic: stream doesn't support seeking backwards

Interestingly, it works just fine for non-binary literals:

    perl -e 'use Compress::Raw::Zlib;
             print "a COMPRESS DEFLATE\r\n";
             sleep 1;
             my $d = new Compress::Raw::Zlib::Deflate( -WindowBits => -15 );
             $d->deflate("b APPEND TRASH {1+}\r\nx\r\n", my $buf);
             print $buf;
             $d->flush($buf, Z_SYNC_FLUSH);
             print $buf;
             sleep 1;
    ' | /usr/lib/dovecot/imap

However I can't reproduce the problem Dovecot 2.2.18 and Debian Sid (but
it doesn't help to install Dovecot from testing to my Wheezy box.)
Changelog
interimap
interimap.1
interimap.sample
lib/Net/IMAP/InterIMAP.pm