Dovecot 2.0.x before 2.0.16, when ssl or starttls is enabled and hostname is used to define the proxy destination, does not verify that the server hostname matches a domain name in the subject’s Common Name (CN) of the X.509 certificate, which allows man-in-the-middle attackers to spoof SSL servers via a valid certificate for a different hostname.
hg.dovecot.org/dovecot-2.0/rev/5e9eaf63a6b1
rhn.redhat.com/errata/RHSA-2013-0520.html
secunia.com/advisories/46886
secunia.com/advisories/52311
www.dovecot.org/list/dovecot-news/2011-November/000200.html
www.openwall.com/lists/oss-security/2011/11/18/5
www.openwall.com/lists/oss-security/2011/11/18/7
bugs.gentoo.org/show_bug.cgi?id=390887
bugzilla.redhat.com/show_bug.cgi?id=754980