Bug 366238 - KMail does not fetch mails from imap.kabelmail.de
Summary: KMail does not fetch mails from imap.kabelmail.de
Status: REPORTED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 5.2.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Christian Mollekopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-29 10:06 UTC by franz-joseph.barthold
Modified: 2020-11-28 17:13 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
xsession-errors (74.26 KB, text/plain)
2017-01-17 19:49 UTC, Krzysztof Dubowik
Details
kimap logs from test akonadi instance (1.54 KB, application/gzip)
2017-09-05 21:24 UTC, bugs.kde.org-1
Details
akonadi test instance logs (1.22 KB, application/x-compressed-tar)
2018-03-18 13:40 UTC, Krzysztof Dubowik
Details
akonadi console debugger log (97.30 KB, text/html)
2018-03-18 13:53 UTC, Krzysztof Dubowik
Details
akonadi console kimap logs (3.51 KB, application/zip)
2020-11-28 17:12 UTC, Eridani Rodríguez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description franz-joseph.barthold 2016-07-29 10:06:57 UTC
Initially, https://bugs.kde.org/show_bug.cgi?id=364045 has been resolved.
Thank you for your effort in fixing this bug.

Now, on openSUSE Tumbleweed using KDEPIM 16.04.3, the imap resource does not fetch mails.
I am using a fresh user and a fresh akonadi with only one imap inbox.
Furthermore, using 'akonadiconsole' and deleting the corresponding cash 'Clear Akonadi Cash' does not solve the problem.

'akonadictl restart' shows some information like:
log_imapresource: Detected inconsistency in local cache, we're missing some messages. Server: 223 Local: 0

Reproducible: Always

Steps to Reproduce:
1. create some mail account on imap.kabelmail.de
2. try to fetch mails
3. observe that all mails are missing

Actual Results:  
The protocol issued by 'akonadictl restart' shows lines such as:
log_imapresource: Detected inconsistency in local cache, we're missing some messages. Server: 223 Local: 0

Expected Results:  
All mails should be fetched from server.

I repeated the configuration several times on openSUSE Leap 42.1 and openSUSE Tumbleweed with both KDEPIM 16.04.3 using old and new (fresh) users. I like to exclude any local misconfiguration.
Comment 1 franz-joseph.barthold 2016-09-04 16:52:18 UTC
Actually opensuse tumbleweed has been updated to KDE Applications 16.08 including KDEPIM.

The reported bug is still existing.

Please advice me what kind of additional information are needed.
Comment 2 Krzysztof Dubowik 2016-11-28 20:46:35 UTC
I have the same issue using Kubuntu 16.10 (kmail version 5.2.3)

These messages appear in .xsession-errors and the emails are not fetched:
log_imapresource: Detected inconsistency in local cache, we're missing some messages. Server:  64  Local:  0
log_imapresource: Refetching complete mailbox.
log_imapresource: Detected inconsistency in local cache, we're missing some messages. Server:  630  Local:  0
log_imapresource: Refetching complete mailbox.
log_imapresource: Detected inconsistency in local cache, we're missing some messages. Server:  45  Local:  0
log_imapresource: Refetching complete mailbox.
log_imapresource: Detected inconsistency in local cache, we're missing some messages. Server:  22  Local:  0
log_imapresource: Refetching complete mailbox.
Comment 3 Daniel Vrátil 2017-01-07 12:15:19 UTC
Looks like the folder is not successfully synced so the IMAP resource tries to re-fetch every time.

Is there any debug output from Akonadi itself that could indicate what goes wrong?
Comment 4 franz-joseph.barthold 2017-01-11 09:47:32 UTC
Unfortunately, there is no further debug output.

I only observe the difference between mails on the server and local mails.

Using openSUSE Tumbleweed, the most recent version of KDE Applications 16.12 is available for testing. But the behavior has not changed.
Comment 5 Krzysztof Dubowik 2017-01-17 19:49:43 UTC
Created attachment 103466 [details]
xsession-errors

I don't know how to switch on akonadi debug. I attach the complete .xsessions-error file, hope you will find something useful there. If not, please tell me how to enable debug.
Comment 6 franz-joseph.barthold 2017-01-17 20:06:17 UTC
I like to add the observation, that the IMAP account works on all Thunderbird instances using either Windows or Linux.

But it fails on all KDE instances including some 4.14 version on Windows delivered my Kolab and the most recent 16.12.0 on OpenSUSE Tumbleweed.

I  could perform some further tests in case I receive some detailed information on what to test. Furthermore, I can offer access to the IMAP server for testing.
Comment 7 Sven Klomp 2017-03-06 11:14:02 UTC
I had a similar problem with DomainFactory IMAP.
Did you try to change authentication to Cleartext. This worked for me.
Comment 8 Sven Klomp 2017-03-06 11:18:17 UTC
See https://bugs.kde.org/show_bug.cgi?id=280075 for additional information.
Comment 9 Krzysztof Dubowik 2017-04-22 13:44:44 UTC
Changing to Cleartext does not solve the problem.
Why is it bug only "normal". It makes Kmail completely useless.
Comment 10 franz-joseph.barthold 2017-08-01 14:01:03 UTC
I installed akonadicontrol on opensuse leap 42.3 using KDE Applications 17.04.3.
Furthermore, in akonadicontrol / browser for the IMAP account the command 'Clear Akonadi Cache' and finally, 'akonadictl restart'.

The following error message has been issued for the relevant akonadi_imap_resource_4, i.e. the IMAP account of KabelMail:

Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadicontrol: "AgentManager::agentInstanceSynchronizeCollection"  Agent instance  "akonadi_imap_resource_4"  has no resource interface!
org.kde.pim.akonadiserver: "Cannot connect to agent instance with identifier 'akonadi_imap_resource_4', error message: ''"

What kind of information do you need furthermore to judge on the issue?
Comment 11 bugs.kde.org-1 2017-08-05 12:11:02 UTC
I have several IMAP accounts in my KMail. I have migrated from kmail4 to kmail5, and some of them stopped working, as in the bug description. There are two accounts from one provider (interia.pl), and a few from other providers, and only the first provider has stopped working. It has the following IMAP flags:

IMAP4REV1 UIDPLUS CHILDREN ID XLIST NAMESPACE IDLE AUTH=PLAIN

While others (on dovecot) has more:

IMAP4REV1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE

I tried updating to 17.08 RC but this has not helped.

Tried clearing cache, changing auth method, nothing helped.
Comment 12 Daniel Vrátil 2017-09-04 21:12:04 UTC
Please run the following commands from a terminal:

export KIMAP_LOGFILE=/tmp/kimap.log
akonadictl --instance test start

(using the --instance test switch ensures that anything we do will be completely isolated from your main Akonadi setup).

Then start the Akonadi Console, and select the "test" instance. Use the "Agents" tab to add a new IMAP resource and configure it to the server that does not work and try to synchronize it.

Afterwards, you can run "akonadictl --instance test stop" in the terminal.

Now there should have a few /tmp/kimap.log.XXX files - make sure they don't contain any sensitive information and attach them here, or send them to me privately. The files contain logs of raw IMAP communication between the IMAP resource and the IMAP server, hopefully, with that information, I'll be able to figure out what our implementation does not like about those IMAP servers :)
Comment 13 bugs.kde.org-1 2017-09-05 21:24:47 UTC
Created attachment 107710 [details]
kimap logs from test akonadi instance
Comment 14 franz-joseph.barthold 2017-09-23 17:07:43 UTC
I started to generate the requested files on my different systems.
Now I can observe the following behavior.

I operate openSUSE Leap 42.3, Leap 42.2 and tumbleweed on a Linux laptop.
Furthermore, KMail client E14, see
https://mirror.kolabenterprise.com/pub/upload/windows/Kontact-E14-LATEST.exe,
on two different Windows 10 desktops.

Previously, all installations failed to fetch mails from imap.kabelmail.de.
The sub-folders of the account where detected but never filled with mails as 
outlined in the bug report. This behavior was consistently observed over years on Leap 42.2, tumbleweed, and Windows until early July 2017. Thus, I always used the POP3 version to retrieve the mails from this server. 

Now, after the holiday season, the mails are fetched on all systems (Linux and Windows). But due to the improvement on Windows using KDE 4.13.0.24, I assume that the server running imap.kabelmail.de was updated at any time this summer to a new version. I do not believe any longer that some Linux client running KDEPIM  is responsible. This also explains, why this bug has not been erased by KDEPIM developers.

Thus, I could only provide protocols from positively working examples.
Are these still interesting?

Nevertheless, I like to thank you for all the time and effort in running and 
improving KDEPIM.
Comment 15 Christoph Feck 2017-10-10 22:30:51 UTC
Thanks for the update; changing status.
Comment 16 Krzysztof Dubowik 2018-03-18 13:40:12 UTC
Created attachment 111479 [details]
akonadi test instance logs

I still have this problem using kmail2 5.5.3 (from Kubuntu 17.10). Akonadi test instance logs attached.
Comment 17 Krzysztof Dubowik 2018-03-18 13:53:06 UTC
Created attachment 111480 [details]
akonadi console debugger log

Does the akonadi console debug output help at all?
Comment 18 Krzysztof Dubowik 2018-05-14 23:32:15 UTC
Problem still there in 5.7.3 (Kubuntu 18.04)
Comment 19 Krzysztof Dubowik 2019-06-09 17:12:08 UTC
Is anyone looking at this bug?
Comment 20 Christoph Feck 2019-06-25 16:02:28 UTC
Could it be related to translations/encoding? I see both IMAP folder names from logs in comment #16 and comment #13 have non-ASCII characters.
Comment 21 Krzysztof Dubowik 2019-06-25 17:29:19 UTC
Even if folder names character encoding would be a problem "INBOX" folder should work fine, right?
Comment 22 Eridani Rodríguez 2020-11-28 17:12:13 UTC
Created attachment 133704 [details]
akonadi console kimap logs

I'm experiencing this problem with an account from my local ISP, akonadi can see the IMAP folder, how many messages are on them, see the discrepancy between message count on the server and local copies, tries to fetch them but won't fetch a thing at the end, no feedback either, other mail accounts from popular services (google, yahoo, etc.) work well by the way. This problematic account can be synced in Thunderbird but not on Kmail (Trojita failed too), I've attached the kimap.log files from my test conducted as explained a few comments above.

As after reading the logs it doesn't seem to be any specially helpful info on them at least to my untrained eye, I'll be able to conduct more testing if guided. Also, can provide login credentials for this account if needed.
Comment 23 Eridani Rodríguez 2020-11-28 17:13:36 UTC
Forgot my system info:

Operating System: KDE neon 5.20
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.1
Kernel Version: 5.4.0-54-generic
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-4670 CPU @ 3.40GHz
Memory: 15.6 GiB of RAM
Graphics Processor: GeForce GTX 1060 3GB/PCIe/SSE2