Bug 189382 - No usage of imap+TLS when server doesn't use a greeting with imap capabilities
Summary: No usage of imap+TLS when server doesn't use a greeting with imap capabilities
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.11.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-11 17:50 UTC by mark
Modified: 2010-02-15 14:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mark 2009-04-11 17:50:43 UTC
Version:           1.11.1 (using KDE 4.2.1)
Compiler:          gcc 4.3.3 
OS:                Linux
Installed from:    Gentoo Packages

Our mailserver (dovecot) has the ability to send the imap capabilities in it's greeting message or to disable this behaviour:
-----------
# Send IMAP capabilities in greeting message. This makes it unnecessary for
# clients to request it with CAPABILITY command, so it saves one round-trip.
# Many clients however don't understand it and ask the CAPABILITY anyway.
login_greeting_capability = yes
-----------

With this option enabled, a telnet login prints the following output and kmail works without errors:
-----------
* OK [CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS UIDPLUS LIST-EXTENDED I18NLEVEL=1 STARTTLS AUTH=PLAIN] Dovecot ready.
-----------

But after setting this parameter to "no" (greeting then is "Dovecot ready"), kmail is not able to fetch emails with TLS enabled, though the detection of TLS works in the account settings. kmail seems to do nothing at all until the connection is closed by the server.
I had to set kmail to SSL instad and then it worked with the current server configuration.

So my guess is: kmail logs in and uses TLS properly for this connection if and only if the server _greets_ with STARTTLS, though the correct capabilities can be read with the capabilities-command.

Please let kmail either use the capabilities-command directly directly after connection (if no capabilities are received by the greeting message), which is probably the best way or let kmail use the settings from the account settings.

Oh, and a warning/notification in some way would be great, e.g. "Logging in... OK", "no capabilities in greeting, asking capabilities..." as label messages in the status bar.
Comment 1 mark 2010-02-15 14:57:04 UTC
dovecot 1.2 has the login_greeting_capability option removed (defaulting to no) and with the option 'login_greeting = Dovecot ready.' KMail 1.13.0 is able to fetch emails using TLS, so this bug isn't valid anymore.