Bug 264127

Summary: kmail2 only shows messages that were fetched since the last kmail start
Product: [Frameworks and Libraries] Akonadi Reporter: S. Burmeister <sven.burmeister>
Component: libakonadiAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: aspotashev, kdepim-bugs, mcv, vkrause, woebbeking
Priority: NOR    
Version: 4.6   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description S. Burmeister 2011-01-24 00:22:27 UTC
Version:           4.6 (using KDE 4.5.95) 
OS:                Linux

I have two imap accounts. One works properly, i.e. it does show all emails in the inbox. The other one only shows emails that arrived after kmail was started.

the imap's url is mailbox.rwth-aachen.de:993

If I have a look at the account in the akonadi console it does show  the correct number of emails in the left pane it does not show any items in the right pane though.

This did work with former versions of akonadi, yet I do not remember when it changed, I'd guess one month ago.

Reproducible: Always
Comment 1 S. Burmeister 2011-02-14 14:18:47 UTC
This happens to the second imap-server one adds. If I add the server I mentioned in the first comment as the first one it does display all messages. And the one that previously worked does not show any messages if added as second imap server.

libakonadi4-4.6.0svn.rev1216163-3.1.i586
libakonadiprotocolinternals1-1.5.0.60git.1295707206-2.1.i586
akonadi-runtime-1.5.0.60git.1295707206-2.1.i586
akonadi-4.6.40.git.1297553888-3.1.i586
kmail-4.6.40.git.1297553888-3.1.i586

The akonadiconsole does not show anything either.
Comment 2 Torgny Nyblom 2011-04-23 18:36:53 UTC
Could you use the akonadiconsole to see if the second account has any items with a remote id that is null?

(Tab db Console, query "select * from pimitemtable where remoteId = null")
Comment 3 Michał 2011-07-31 16:25:56 UTC
I run akonadiconsole and got this output when clicking on the KMail folder:

posting retrieval request for item 63748  there are  1  queues and  0  items in mine 
processing retrieval request for item 63748  parts: ("ENVELOPE")  of resource: "akonadi_mixedmaildir_resource_1" 
request for item 63748 still pending - waiting 
akonadi_mixedmaildir_resource_1(29349)/akonadiresource (maildir): Failed to read item "{869a924c-06ab-4538-97df-bbd3cffb991b}" in Maildir "/home/mcv/Mail/inbox" 
akonadi_mixedmaildir_resource_1(29349)/akonadiresource (maildir): "Error while reading mails from folder " 
continuing 
request for item 63748 "{869a924c-06ab-4538-97df-bbd3cffb991b}" failed: "Resource was unable to deliver item" 
ItemRetrieverException :  Resource was unable to deliver item


Actually there is a file named like above (in ~/Mail/inbox/new), but it's only one byte long, hexedit shows: 0x0a.
Comment 4 Michał 2011-07-31 16:26:37 UTC
Aaargh, wrong bug. This was supposed to go to 263223.
Comment 5 Kevin Ottens 2011-09-17 10:32:45 UTC
Reassigning, it's in fact likely something in the ETM.
Comment 6 S. Burmeister 2011-10-19 22:17:58 UTC
I see the same even for imap accounts:

/home/username/.local/share/akonadi/file_db_data/ contains empty files, e.g.:

100497_r0 with 0 byte
Comment 7 Denis Kurz 2016-09-24 20:32:04 UTC
This bug has only been reported for versions older than KDEPIM 4.14 (at most akonadi-1.3). Can anyone tell if this bug still present?

If noone confirms this bug for a recent version of akonadi (part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 8 Denis Kurz 2017-01-07 21:33:47 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.