We recently had issues getting
Horde/IMP and IMAP/TLS to work. We couldn't figure it out,and web searches were no help as there were lots of people asking and no answers. The logsand messages were no help either, giving us no clue as to what the problem was. We tried'protocol' => 'imap' and 'protocol' => 'imap/tls' but neither worked.Then it occured to the fellow sysadmin I was working with on the problem, perhaps we need'protocol' => 'imap/tls/novalidate-cert', as we are using a self-signed certificate. That was the answer.