Thunderbird IMAP TLS Bug

Thunderbird seems to be a bit buggy connecting via IMAP/TLS to a Courier server. When Courier is set up to disallow non-TLS connections, it advertises STARTTLS and LOGINDISABLED. This is a challenge for the mail client to send the STARTTLS command before logging in. Thunderbird doesn’t do that: as soon as it sees LOGINDISABLED, it aborts the connection with error message. This happens even if the account settings in Thunderbird are set to require TLS.