Bug 380307 - IMAP fails against Exchange 2016
Summary: IMAP fails against Exchange 2016
Status: RESOLVED WORKSFORME
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 5.2.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Christian Mollekopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-29 09:20 UTC by quazgar
Modified: 2022-12-06 05:20 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of the duplicate messages. (178.59 KB, image/png)
2017-06-26 13:35 UTC, quazgar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description quazgar 2017-05-29 09:20:28 UTC
Our mail provider (gwdg.de) just switched to MS Exchange 2016 and KMail stopped working, it displays an authentication failure message:

  The server for account "MPI" refused the supplied username and password. Do you want to go to the settings, have another attempt at logging in, or do nothing?

  Login failed, server replied: A000003 NO AUTHENTICATE failed.

During several retries, this is the akonadi output on the terminal:

Pass a valid window to KWallet::Wallet::openWallet().
Pass a valid window to KWallet::Wallet::openWallet().
QXcbConnection: XCB error: 3 (BadWindow), sequence: 8197, resource id: 37811015, major code: 40 (TranslateCoords), minor code: 0
Pass a valid window to KWallet::Wallet::openWallet().
log_kimap: We asked for UID but the server didn't give it back, resultingFlags not stored.
log_kimap: We asked for UID but the server didn't give it back, resultingFlags not stored.
akonadiagentbase_log: "Only resources can modify remote identifiers"
log_kimap: We asked for UID but the server didn't give it back, resultingFlags not stored.
akonadiagentbase_log: "Only resources can modify remote identifiers"
akonadiagentbase_log: "Only resources can modify remote identifiers"
Pass a valid window to KWallet::Wallet::openWallet().

This is via STARTTLS on port 143.  When trying to connect directly with SSL/TLS on port 993, the akonadi output is (this also looks like a Qt socket problem, possibly related to https://stackoverflow.com/questions/15213139/simple-qssl-client-server-cannot-start-handshake-on-non-plain-connection):

qt.network.ssl: QSslSocket::startClientEncryption: cannot start handshake on non-plain connection
log_kimap: Connection to server lost  0
log_imapresource: Session login cancelled
Pass a valid window to KWallet::Wallet::openWallet().

The Akonadi error popup window shows a slightly different message from the server:

  The server for account "MPI" refused the supplied username and password. Do you want to go to the settings, have another attempt at logging in, or do nothing?

  Login failed, server replied: A000002 NO AUTHENTICATE failed.

Any idea if this is a problem on Akonadi's side or on the server side?

I am working on a Debian Testing system:

$ akonadictl -v
Akonadi 5.2.2
$ kontact -v
kontact 5.2.3
$ kmail -v
kmail2 5.2.3
Comment 1 Daniel Vrátil 2017-06-02 19:59:58 UTC
Have you tried using different authentication mechanism? You can configure it in Settings -> Configure KMail -> Accounts -> select your IMAP account -> Modify -> Advanced -> Authentication.
Comment 2 Christoph Feck 2017-06-13 16:16:42 UTC
If you can provide the information requested in comment #1, please add it.
Comment 3 Christoph Feck 2017-06-26 12:16:20 UTC
To further investigate this issue, KDE developers need the information requested in comment #1. If you can provide it, or need help with finding that information, please add a comment.
Comment 4 quazgar 2017-06-26 13:35:53 UTC
Created attachment 106308 [details]
Screenshot of the duplicate messages.
Comment 5 quazgar 2017-06-26 13:37:20 UTC
Thank you for reminding me!

I actually had tried all the authentication methods before posting the bug already.  Before the upgrade to Exchange 2016, the connection used to work with SSL/TLS on port 993 and plain authentication.

One server-side change which was announced was that from this version on, the username would no longer be the email address but of type "$domain\$user" (the Microsoft specific user name convention), for example "gwdg\foobar".  Another user here found out that this did not help at all, but what did help was to replace the correct backslash by a normal slash (which is not supposed to work).  So what worked for her was "gwdg/foobar".  Maybe that is an excessive interpretation of the backslash as an escape character?

I also tried this variant but unfortunately ran into the problem that KMail/Akonadi started running into an infinite loop with automatic filtering of messages, see the attached screenshot.  I am not sure if this has to do with my using of Thunderbird as an intermediate solution (not sure if it was connected to the same IMAP account simultaneously or not) or if this is linked to the original problem.  Anyways since Akonadi did not stop to duplicate these messages, the only way for me to keep a working computer was to disable the account in KMail and use Thunderbird for the time being.
Comment 6 quazgar 2017-06-26 14:35:56 UTC
Some akonadi output during a lookup from the server.  There was one message which I marked as spam before but which was now seemingly fetched again and moved as a "ghost" message into my (local) spam folder, where it now sits alongside the original message.  Maybe that was also the cause of the previous filter problems, that moving messages to other folders worked locally but the messages were not removed remotely, and then fetched from the server again and again?

Anyways, here's the output:

log_imapresource: Detected inconsistency in local cache, we're missing some messages. Server:  24  Local:
0
log_imapresource: Refetching complete mailbox.
log_imapresource: Detected inconsistency in local cache, we're missing some messages. Server:  246  Local:  244
log_imapresource: Refetching complete mailbox.
Tokenizer Warning: attribute ends with "*", but value is a quoted-string!Chopping away "*".
Tokenizer Warning: attribute ends with "*", but value is a quoted-string!Chopping away "*".
Tokenizer Warning: attribute ends with "*", but value is a quoted-string!Chopping away "*".
Tokenizer Warning: attribute ends with "*", but value is a quoted-string!Chopping away "*".
QDBusObjectPath Akonadi::Server::NotificationManager::subscribe(const QString&, bool) Akonadi::Server::NotificationManager(0x55e38d81cdc0) "akonadi_imap_resource_0
_2924_GURJ2K" false
QDBusObjectPath Akonadi::Server::NotificationManager::subscribe(const QString&, bool) Akonadi::Server::NotificationManager(0x55e38d81cdc0) "akonadi_imap_resource_0
_2924_yc7Rnz" false
org.kde.akonadi.ETM: GEN true false true
org.kde.akonadi.ETM: collection: QVector()
org.kde.akonadi.ETM: GEN true false true
org.kde.akonadi.ETM: collection: QVector()
Database "akonadi" opened using driver "QMYSQL"
New notification bus: "/subscriber/akonadi_imap_resource_0_2924_GURJ2K"
Database "akonadi" opened using driver "QMYSQL"
New notification bus: "/subscriber/akonadi_imap_resource_0_2924_yc7Rnz"
Tokenizer Warning: attribute ends with "*", but value is a quoted-string!Chopping away "*".
Tokenizer Warning: attribute ends with "*", but value is a quoted-string!Chopping away "*".
org.kde.akonadi.ETM: Subtree:  387 QSet(387)
org.kde.akonadi.ETM: Subtree:  393 QSet(407, 406, 405, 404, 411, 410, 409, 408, 413, 412, 395, 394, 393, 399, 398, 397, 396, 403, 402, 401, 400)
org.kde.akonadi.ETM: Subtree:  4 QSet(173, 172, 345, 344, 322, 372, 381, 380, 353, 147, 146, 145, 367, 144, 366, 151, 150, 149, 148, 155, 154, 153, 152, 159, 157,
156, 131, 135, 134, 287, 133, 286, 132, 7, 285, 139, 6, 137, 4, 136, 11, 143, 142, 9, 140, 179, 178, 13, 177, 12, 176, 163, 162, 161, 160, 313, 167, 166, 165, 164,
 171, 170, 290, 169, 289, 168, 288, 175, 174)
org.kde.akonadi.ETM: Fetch job took  8375 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 91
org.kde.akonadi.ETM: first fetched collection: "Local Folders"
org.kde.akonadi.ETM: Subtree:  387 QSet(387)
org.kde.akonadi.ETM: Subtree:  393 QSet(407, 406, 405, 404, 411, 410, 409, 408, 413, 412, 395, 394, 393, 399, 398, 397, 396, 403, 402, 401, 400)
org.kde.akonadi.ETM: Subtree:  4 QSet(173, 172, 345, 344, 322, 372, 381, 380, 353, 147, 146, 145, 367, 144, 366, 151, 150, 149, 148, 155, 154, 153, 152, 159, 157,
156, 131, 135, 134, 287, 133, 286, 132, 7, 285, 139, 6, 137, 4, 136, 11, 143, 142, 9, 140, 179, 178, 13, 177, 12, 176, 163, 162, 161, 160, 313, 167, 166, 165, 164,
 171, 170, 290, 169, 289, 168, 288, 175, 174)
org.kde.akonadi.ETM: Fetch job took  8394 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 91
org.kde.akonadi.ETM: first fetched collection: "Local Folders"
Database "akonadi" opened using driver "QMYSQL"
Database "akonadi" opened using driver "QMYSQL"
Database "akonadi" opened using driver "QMYSQL"
Database "akonadi" opened using driver "QMYSQL"
Database "akonadi" opened using driver "QMYSQL"
Database "akonadi" opened using driver "QMYSQL"
Database "akonadi" opened using driver "QMYSQL"
Database "akonadi" opened using driver "QMYSQL"
Database "akonadi" opened using driver "QMYSQL"
Database "akonadi" opened using driver "QMYSQL"
Database "akonadi" opened using driver "QMYSQL"
log_kimap: We asked for UID but the server didn't give it back, resultingFlags not stored.
Database "akonadi" opened using driver "QMYSQL"
false
Shutting down "/subscriber/akonadi_imap_resource_0_2924_GURJ2K" ...
Shutting down "/subscriber/akonadi_imap_resource_0_2924_yc7Rnz" ...
posting retrieval request for item 86148  there are  1  queues and  0  items in mine
request for item 86148 still pending - waiting
processing retrieval request for item 86148  parts: ("RFC822", "HEAD")  of resource: "akonadi_maildir_resource_0"
continuing
request for item 86148 succeeded
Database "akonadi" opened using driver "QMYSQL"
SEARCH:
        Query: "{\n    \"limit\": -1,\n    \"negated\": false,\n    \"rel\": 1,\n    \"subTerms\": [\n        {\n            \"cond\": 0,\n            \"key\": \"e
mail\",\n            \"negated\": false,\n            \"value\": \"yyyy@xxxx.com\"\n        }\n    ]\n}\n"
        MimeTypes: ("text/directory")
        Collections: QVector(0, 329, 343)
        Remote: false
        Recursive true
Executing search "kontact-1186278907-SearchSession"
Search done "kontact-1186278907-SearchSession" (without remote search)
        Result: 0 matches
SEARCH:
        Query: "{\n    \"limit\": -1,\n    \"negated\": false,\n    \"rel\": 1,\n    \"subTerms\": [\n        {\n            \"cond\": 0,\n            \"key\": \"e
mail\",\n            \"negated\": false,\n            \"value\": \"yyyy@xxxx.com\"\n        }\n    ]\n}\n"
        MimeTypes: ("text/directory")
        Collections: QVector(0, 329, 343)
        Remote: false
        Recursive true
Executing search "kontact-1186278907-SearchSession"
Search done "kontact-1186278907-SearchSession" (without remote search)
        Result: 0 matches
posting retrieval request for item 88704  there are  1  queues and  0  items in mine
request for item 88704 still pending - waiting
processing retrieval request for item 88704  parts: ("RFC822", "HEAD")  of resource: "akonadi_maildir_resource_0"
continuing
request for item 88704 succeeded
SEARCH:
        Query: "{\n    \"limit\": -1,\n    \"negated\": false,\n    \"rel\": 1,\n    \"subTerms\": [\n        {\n            \"cond\": 0,\n            \"key\": \"e
mail\",\n            \"negated\": false,\n            \"value\": \"xxxx@yyyy.com\"\n        }\n    ]\n}\n"
        MimeTypes: ("text/directory")
        Collections: QVector(0, 329, 343)
        Remote: false
        Recursive true
Executing search "kontact-1186278907-SearchSession"
Search done "kontact-1186278907-SearchSession" (without remote search)
        Result: 0 matches
SEARCH:
        Query: "{\n    \"limit\": -1,\n    \"negated\": false,\n    \"rel\": 1,\n    \"subTerms\": [\n        {\n            \"cond\": 0,\n            \"key\": \"e
mail\",\n            \"negated\": false,\n            \"value\": \"xxxx@yyyy.com\"\n        }\n    ]\n}\n"
        MimeTypes: ("text/directory")
        Collections: QVector(0, 329, 343)
        Remote: false
        Recursive true
Executing search "kontact-1186278907-SearchSession"
Search done "kontact-1186278907-SearchSession" (without remote search)
        Result: 0 matches
QDBusObjectPath Akonadi::Server::NotificationManager::subscribe(const QString&, bool) Akonadi::Server::NotificationManager(0x55e38d81cdc0) "akonadi_imap_resource_0
_2924_cFcfIq" false
QDBusObjectPath Akonadi::Server::NotificationManager::subscribe(const QString&, bool) Akonadi::Server::NotificationManager(0x55e38d81cdc0) "akonadi_imap_resource_0
_2924_waiQY4" false
org.kde.akonadi.ETM: GEN true false true
org.kde.akonadi.ETM: collection: QVector()
org.kde.akonadi.ETM: GEN true false true
org.kde.akonadi.ETM: collection: QVector()
Database "akonadi" opened using driver "QMYSQL"
New notification bus: "/subscriber/akonadi_imap_resource_0_2924_waiQY4"
Database "akonadi" opened using driver "QMYSQL"
New notification bus: "/subscriber/akonadi_imap_resource_0_2924_cFcfIq"
org.kde.akonadi.ETM: Subtree:  387 QSet(387)
org.kde.akonadi.ETM: Subtree:  393 QSet(407, 406, 405, 404, 411, 410, 409, 408, 413, 412, 395, 394, 393, 399, 398, 397, 396, 403, 402, 401, 400)
org.kde.akonadi.ETM: Subtree:  4 QSet(173, 172, 345, 344, 322, 372, 381, 380, 353, 147, 146, 145, 367, 144, 366, 151, 150, 149, 148, 155, 154, 153, 152, 159, 157,
156, 131, 135, 134, 287, 133, 286, 132, 7, 285, 139, 6, 137, 4, 136, 11, 143, 142, 9, 140, 179, 178, 13, 177, 12, 176, 163, 162, 161, 160, 313, 167, 166, 165, 164,
 171, 170, 290, 169, 289, 168, 288, 175, 174)
org.kde.akonadi.ETM: Fetch job took  67 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 91
org.kde.akonadi.ETM: first fetched collection: "Local Folders"
org.kde.akonadi.ETM: Subtree:  387 QSet(387)
org.kde.akonadi.ETM: Subtree:  393 QSet(407, 406, 405, 404, 411, 410, 409, 408, 413, 412, 395, 394, 393, 399, 398, 397, 396, 403, 402, 401, 400)
org.kde.akonadi.ETM: Subtree:  4 QSet(173, 172, 345, 344, 322, 372, 381, 380, 353, 147, 146, 145, 367, 144, 366, 151, 150, 149, 148, 155, 154, 153, 152, 159, 157,
156, 131, 135, 134, 287, 133, 286, 132, 7, 285, 139, 6, 137, 4, 136, 11, 143, 142, 9, 140, 179, 178, 13, 177, 12, 176, 163, 162, 161, 160, 313, 167, 166, 165, 164,
 171, 170, 290, 169, 289, 168, 288, 175, 174)
org.kde.akonadi.ETM: Fetch job took  81 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 91
org.kde.akonadi.ETM: first fetched collection: "Local Folders"
Executing search "searchUpdate-1498487287"
searchUpdateResultsAvailable 374 0 results
Got 0 results, out of which 0 are already in the collection
Added 0
Search done "searchUpdate-1498487287" (without remote search)
Search update finished
All results: 0
Removed results: 0
Executing search "searchUpdate-1498487287"
searchUpdateResultsAvailable 373 1 results
Got 1 results, out of which 1 are already in the collection
Added 0
Search done "searchUpdate-1498487287" (without remote search)
Search update finished
All results: 1
Removed results: 0
Shutting down "/subscriber/akonadi_imap_resource_0_2924_waiQY4" ...
Shutting down "/subscriber/akonadi_imap_resource_0_2924_cFcfIq" ...
false
SEARCH:
        Query: "{\n    \"limit\": -1,\n    \"negated\": false,\n    \"rel\": 1,\n    \"subTerms\": [\n        {\n            \"cond\": 0,\n            \"key\": \"e
mail\",\n            \"negated\": false,\n            \"value\": \"xxxx@yyyy.com\"\n        }\n    ]\n}\n"
        MimeTypes: ("text/directory")
        Collections: QVector(0, 329, 343)
        Remote: false
        Recursive true
Executing search "kontact-1186278907-SearchSession"
Search done "kontact-1186278907-SearchSession" (without remote search)
        Result: 0 matches
akonadi_ical_resource: writeToFile() mCalendar is 0!
Error writing to file
Comment 7 Justin Zobel 2022-11-06 09:25:22 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 8 Bug Janitor Service 2022-11-21 05:13:26 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2022-12-06 05:20:10 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!