Setting up imaps with haproxy and local certs?

This only works for ports with implicit SSL. It cannot work with STARTTLS based approaches: