Bug 233206 - Connection settings miss-detected
Summary: Connection settings miss-detected
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Casey Link
URL:
Keywords: akonadi-ports-regression
: 233538 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-03 22:21 UTC by Thomas McGuire
Modified: 2010-05-26 00:14 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
akonadi log + rc files for the 3 servers. (17.63 KB, text/plain)
2010-04-08 23:55 UTC, Christophe Marin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas McGuire 2010-04-03 22:21:46 UTC
I used "Auto-Detect" to detect the connection settings for demo.kolab.org. The config dialog chose "LOGIN".
After confirming the config dialog, I got the error message from the server "Login failed, authentication mode LOGIN is not supported by the server.".

After going back to the settings, the combobox suddenly shows "clear text" as selected entry.
Comment 1 Casey Link 2010-04-05 19:53:46 UTC
SVN commit 1111450 by link:

correctly map between the different enums used to represent the
authentiation modes in the imap resorce.

CCBUG: 233206

 M  +36 -1     setupserver.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1111450
Comment 2 Thomas McGuire 2010-04-05 21:22:48 UTC
Still does not work. The only difference is that it selects "PLAIN" in the combobox when auto-detecting, after that, everything is the same as before.
Comment 3 Casey Link 2010-04-05 23:36:42 UTC
SVN commit 1111511 by link:

make imap server save authentication mode chosen by the user (or
servertest)
CCMAIL: mcguire@kde.org
BUG: 233206

 M  +10 -3     setupserver.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1111511
Comment 4 Christophe Marin 2010-04-07 00:41:36 UTC
reopen. with r1111636, the settings discovered when using the auto-detect button are not all saved.

akonadi_imap_resourceXrc doesn't store the Authentication value nor the connection port.

The stored 'safety' value also seem to mismatch the value expected by kimap.
the account dialog actually saves:
1 for unencrypted,
2 for SSL/TLS,
nothing for STARTTLS.

which causes a crash when the resource is started.

(gdb) 
#12 0x08065a73 in ImapAccount::ImapAccount (this=0x81bd2a0, settings=0x810ef40, parent=0x8153a78)
    at /kde/src/KDE/kdepim-runtime/resources/imap/imapaccount.cpp:78
78          kFatal("Shouldn't happen...");

(can't paste the full bt, the frame below contains the imap password in clear text).
Comment 5 Thomas McGuire 2010-04-07 13:13:41 UTC
*** Bug 233538 has been marked as a duplicate of this bug. ***
Comment 6 Thomas McGuire 2010-04-07 13:15:33 UTC
The duplicate bug, bug 233538, has a similar crash related to encryption settings.
Comment 7 Casey Link 2010-04-07 15:31:42 UTC
SVN commit 1112152 by link:

remove the conversion between arbitrary numbers and enum types, this is
taken care of in the imap dialog. corrects imap encryption saving
issues.
CCBUG: 233206

 M  +2 -42     imapaccount.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1112152
Comment 8 Casey Link 2010-04-08 19:13:33 UTC
SVN commit 1112617 by link:

if no auth modes are found, default to cleartext, prevents an empty
authentication combobox.
CCBUG: 233206

 M  +5 -0      servertest.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1112617
Comment 9 Casey Link 2010-04-08 19:13:44 UTC
SVN commit 1112618 by link:

Make sure the port settings are changed after a servertest.
CCBUG: 233206

 M  +1 -0      setupserver.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1112618
Comment 10 Christophe Marin 2010-04-08 23:55:37 UTC
Created attachment 42605 [details]
akonadi log + rc files for the 3 servers.
Comment 11 Christophe Marin 2010-04-08 23:56:15 UTC
today's tests with a rev > 112618:

[/kde/inst/kdepim-runtime/bin/akonadi_imap_resource] akonadi_imap_resource_1(22595) SetupServer::slotSafetyChanged: serverTest null
[/kde/inst/kdepim-runtime/bin/akonadi_imap_resource] akonadi_imap_resource_1(22595) addAuthenticationItem: adding auth item  "Clear text"
[/kde/inst/kdepim-runtime/bin/akonadi_imap_resource] akonadi_imap_resource_1(22595) addAuthenticationItem: adding auth item  "LOGIN"
[/kde/inst/kdepim-runtime/bin/akonadi_imap_resource] akonadi_imap_resource_1(22595) addAuthenticationItem: adding auth item  "PLAIN"
[/kde/inst/kdepim-runtime/bin/akonadi_imap_resource] akonadi_imap_resource_1(22595) addAuthenticationItem: adding auth item  "CRAM-MD5"
[/kde/inst/kdepim-runtime/bin/akonadi_imap_resource] akonadi_imap_resource_1(22595) addAuthenticationItem: adding auth item  "DIGEST-MD5"
[/kde/inst/kdepim-runtime/bin/akonadi_imap_resource] akonadi_imap_resource_1(22595) addAuthenticationItem: adding auth item  "NTLM"
[/kde/inst/kdepim-runtime/bin/akonadi_imap_resource] akonadi_imap_resource_1(22595) addAuthenticationItem: adding auth item  "GSSAPI"
[/kde/inst/kdepim-runtime/bin/akonadi_imap_resource] akonadi_imap_resource_1(22595) addAuthenticationItem: adding auth item  "Anonymous"

appears in the akonadi log after each letter typed in the imap server name
The defaults on the "Advanced" page are STARTTLS / 143 / Clear text. imo, the default should be 'none' instead.

The auto-detect button now seems to try probing the server settings even if the server name is empty.

--

Tests with the same servers as yesterday (logs are attached)

imap.free.fr : 
- detected: none, 143, LOGIN
- saved: Safety=0

If I reopen the config dialog, STARTTLS is selected.

---
imap.gmail.org:
- detected: SSL/TLS, 993, Clear Text 
- saved: Authentication=0, ImapPort=993, Safety=5

If I reopen the config dialog, the selected settings are correct.

---
imap.imapmail.org:
- detected: STARTTLS, 143, PLAIN (looks correct)
- saved: Authentication=2 nothing about the Encryption

When reopening the dialog, SSL/TLS is selected.
Comment 12 Casey Link 2010-04-09 02:25:21 UTC
Did you update kdepimlibs, as well as kdepim?
Comment 13 Christophe Marin 2010-04-09 08:44:46 UTC
Yep, kdepimlibs was at r1112637 (which includes your mailtransports commits).
Comment 14 Casey Link 2010-04-15 10:49:16 UTC
(In reply to comment #13)
> Yep, kdepimlibs was at r1112637 (which includes your mailtransports commits).

Are you sure that imap.free.fr should have Plain Text authentication?

The server is returning that it supports:LOGIN

See:
* CAPABILITY IMAP4REV1 X-NETSCAPE NAMESPACE MAILBOX-REFERRALS SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND LOGIN-REFERRALS AUTH=LOGIN
Comment 15 Casey Link 2010-04-15 11:28:38 UTC
SVN commit 1115109 by link:

remove unnecessary call that was overwriting already populated values.
this should be the final fix for the imap resource.
CCBUG: 233206

 M  +1 -1      setupserver.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1115109
Comment 16 Casey Link 2010-05-26 00:14:37 UTC
Closing this bug, as I haven't been able to reproduce it in trunk.