Skip to content

Handle pure SSL/TLS negotation in Session instead of LoginJob

Fabian Vogt requested to merge work/fvogt/kde449184 into release/21.12

Previously, LoginJob started the SSL negotiation and immediately sent the CAPABILITY command once it completed, without waiting for the server greeting first. Some servers don't like this any close the connection with

  • BYE out-of-sync data before server greeting

Avoid this by starting the encryption in Session directly, which then starts LoginJob after the server greeting arrived. Adjust LoginJob for this by treating an already encrypted connection like a successful negotation, and avoid handling the encryptionNegotiationResult signal before the job was started.

BUG: 449184

I'm not too familiar with either KIMAP or IMAP, but this works here for my work mail account as well as my private ones.

I tested this successfully with SSL/TLS, STARTTLS and No encryption for imap.ionos.de. The error happens before authentication, so this can be tested even without credentials.

Merge request reports

Loading