I’m having some problems at understanding rfc4978.
As I understand it, everything is compressed after the server returnsOK
including the command names. However it seems I misunderstood several things (because[Gmail]/sfgs
isn’t renamed and obviously the file isn’t sent).
$ cat deflatecommands /dev/stdin | socat - OPENSSL:imap.googlemail.com:993,compress=none
* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT APPENDLIMIT=35882577 LIST-EXTENDED LIST-STATUS
a001 OK myus.tyer@gmail.com authenticated (Success)
a002 OK Success
2016/04/28 21:47:03 socat[16204.25769803872] E SSL_write(): Broken pipe
where deflatecommands contains :
a001 LOGIN myus.tyer mypassord
a002 COMPRESS DEFLATE
xÚK400VrõsôuUPŠvÏMÌ̉Õ/NK/VBp+@‰— Ô)
which uncompressed gives :
a001 LOGIN myus.tyer mypassord
a002 COMPRESS DEFLATE
a003 RENAME "[Gmail]/sfgs" "[Gmail]/xxxxxxxxxxx"
Of coursedeflatecommands
usescrfl
line endings in both uncompressed and compressed parts.
deflatecommands
is created with :
$ openssl zlib a003 > a003.zlib
$ cat a001 a002 a003.zlib > defaltecommands