The STARTTLS support in imap-2001a is not enabled by default in 8.2/cooker. It is compiled in into imapsd, but service at imap port runs imapd which has no TLS support.
May I suggest changing to start imapsd on both ports, thus not using imapd at all in default configuration. imapsd seems to support all three modes of operation. Teemu