Bug: IMAP login not working
Status: RESOLVED
Priority: --
Resolution: INVALID
Created: 2020-01-13 14:05:51+00:00
Resolved: 2020-01-14 14:20:59+00:00

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

Trying to login into an IMAP account operated by Cyrus IMAPD 2.5.15 with Cyrus SASL 2.1.26 using IMAPS on port 993. I also tried using STARTTLS on port 143 but that also did not work. I am using Thunderbird 68.3.1 on openSUSE Tumbleweed but have also tested it with Thunderbird 68.4.1 on Windows 10.


Actual results:

Login never finishes. After negotiating TLS encryption, nothing happens anymore.

Thunderbird log:

2020-01-13 13:58:23.599885 UTC - [(null) 20795: Unnamed thread 0x7fa752eec820]: D/IMAP ImapThreadMainLoop entering [this=0x7fa753468000]
2020-01-13 13:58:23.610316 UTC - [(null) 20795: Main Thread]: I/IMAP 0x7fa753468000:hbn.huessenbergnetz.de:NA:SetupWithUrlCallback: clearing IMAP_CONNECTION_IS_OPEN
2020-01-13 13:58:23.610474 UTC - [(null) 20795: Unnamed thread 0x7fa752eec820]: I/IMAP 0x7fa753468000:hbn.huessenbergnetz.de:NA:ProcessCurrentURL: entering
2020-01-13 13:58:23.610515 UTC - [(null) 20795: Unnamed thread 0x7fa752eec820]: I/IMAP 0x7fa753468000:hbn.huessenbergnetz.de:NA:ProcessCurrentURL:imap://hbn0012@hbn.huessenbergnetz.de:993/verifyLogon:  = currentUrl
2020-01-13 13:58:23.681721 UTC - [(null) 20795: Unnamed thread 0x7fa752eec820]: D/IMAP ReadNextLine [stream=0x7fa755def500 nb=0 needmore=1]
2020-01-13 13:58:23.681751 UTC - [(null) 20795: Unnamed thread 0x7fa752eec820]: I/IMAP 0x7fa753468000:hbn.huessenbergnetz.de:NA:CreateNewLineFromSocket: clearing IMAP_CONNECTION_IS_OPEN - rv = 805a3ff6
2020-01-13 13:58:23.681937 UTC - [(null) 20795: Unnamed thread 0x7fa752eec820]: I/IMAP 0x7fa753468000:hbn.huessenbergnetz.de:NA:TellThreadToDie: close socket connection
2020-01-13 13:58:23.681952 UTC - [(null) 20795: Unnamed thread 0x7fa752eec820]: I/IMAP 0x7fa753468000:hbn.huessenbergnetz.de:NA:CreateNewLineFromSocket: (null)
2020-01-13 13:58:23.690624 UTC - [(null) 20795: Unnamed thread 0x7fa752eec820]: I/IMAP 0x7fa753468000:hbn.huessenbergnetz.de:NA:ProcessCurrentURL: aborting queued urls
2020-01-13 13:58:23.698610 UTC - [(null) 20795: Unnamed thread 0x7fa752eec820]: D/IMAP ImapThreadMainLoop leaving [this=0x7fa753468000]

Cyrus IMAPD log:

Jan 13 14:58:23 hbn imaps[22759]: accepted connection
Jan 13 14:58:23 hbn master[22791]: about to exec /usr/lib/cyrus/bin/imapd
Jan 13 14:58:23 hbn imaps[22759]: tls_server_cert=/etc/ssl/cyrus/huessenbergnetz.de.fullchain.pem tls_server_key=/etc/ssl/cyrus/huessenbergnetz.de.key
Jan 13 14:58:23 hbn imaps[22759]: inittls: Loading DH parameters from file
Jan 13 14:58:23 hbn imaps[22759]: TLS Server Name Indication (SNI) Extension: "hbn.huessenbergnetz.de"
Jan 13 14:58:23 hbn imaps[22759]: SSL_accept() incomplete -> wait
Jan 13 14:58:23 hbn imaps[22791]: executed
Jan 13 14:58:23 hbn imaps[22791]: TLS is available.
Jan 13 14:58:23 hbn imaps[22759]: SSL_accept() succeeded -> done
Jan 13 14:58:23 hbn imaps[22759]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits new) no authentication
Jan 13 14:58:23 hbn imaps[22759]: TLS is available.

Manual connection to Cyrus IMAPD with openssl s_client:

* OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE AUTH=PLAIN AUTH=LOGIN SASL-IR] hbn.huessenbergnetz.de Cyrus IMAP 2.5.15 server ready
1 capability
* CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 METADATA LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE AUTH=PLAIN AUTH=LOGIN SASL-IR COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE
1 OK Completed
2 logout
* BYE LOGOUT received
2 OK Completed


Expected results:

Login to the IMAP server should work as with all other MUAs used by IMAP users on the server (KMail/Akonadi, SailfishOS Mail, iPhone Mail, Android Mail, Outlook, Roundcube Webmail).