Not sure without seeing the actual traffic logs, but there are some broken IMAP
servers (including some version of Zimbra, or maybe it's nginx) that don't
respond to Dovecot when it pipelines multiple commands. See if returning
proxy_nopipelining=y in passdb fixes this.
On 1.4.2014, at 13.09,
we have setup a two level proxy configuration for our zimbra server:
[ dovecot 2.2.12 (imap proxy mode) ]
V
[ nginx (imap proxy mode) ]
V
[ zimbra imap server]
and it does not work ... after tying a login, the connection just
hangs and ends after 30 seconds with a