Verify that only one of tls and starttls are enabled.
Fix bug introduced in recent changes where Imap folder was opened readonly.