Bug 284172 - Kmail does not correctly recognize some IMAP-Inbox-Folders
Summary: Kmail does not correctly recognize some IMAP-Inbox-Folders
Status: CONFIRMED
Alias: None
Product: kmail2
Classification: Applications
Component: folders (show other bugs)
Version: 5.22.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 283841 343825 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-16 11:05 UTC by Jannis Menn
Modified: 2023-01-19 00:18 UTC (History)
29 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jannis Menn 2011-10-16 11:05:34 UTC
Version:           4.7 (using KDE 4.7.2) 
OS:                Linux

I use kmail2 with several IMAP-Accounts. Most of them work just fine. I have one account though, where the main inbox-folder is not recognized as a mail-folder. Instead kmail seems to handle it like a top-level-container. This means that I am unable to see the mail in the inbox. I am also unable to manually copy mail into it (when I try to drag-and-drop a mail into the folder, kmail shows me the "unable to copy" sign). All the mail in subfolders of the inbox-folder can be accessed without problems.

As other accounts do work it seems to be a problem with the specific combination of this account and kmail2. The same account does work with thunderbird and kmail1.

Reproducible: Couldn't Reproduce

Steps to Reproduce:
As this bug seems to be account-specific, I don't know how to provide information on how to reproduce it.


Expected Results:  
The folder should be recognized as a normal IMAP-inbox-folder.

OS: Linux (x86_64) release 3.0.0-12-generic
Compiler: gcc
Comment 1 Jannis Menn 2011-10-17 19:26:31 UTC
I got the information from my mail-provider that they use the courier mail server. Maybe this can help to fix the problem.

A correction: I use KDE 4.6.1., not 4.6.2. (which is the version of kmail).
Comment 2 Jannis Menn 2011-10-17 19:27:44 UTC
I meant 4.7.1... sorry.
Comment 3 m.wege 2011-12-23 12:14:30 UTC
I can confirm this bug on Kmail 4.7.4 and 4.8 Beta. I am not sure, but I believe my mail provider also uses courier mail server.
Comment 4 Nicholas Istre 2012-01-10 22:39:44 UTC
I can confirm this on my Imap server (also running courier) on the Kubuntu 12.04 daily (running KDE 4.8 RC2).  My inbox has several other folders in it that I move various emails into, but Kmail doesn't see any emails directly in the Inbox.  This account works fine in Evolution (On my Ubuntu 10.04 workstation) and on my Droid 2 phone.
Comment 5 Andreas T 2012-01-31 20:11:43 UTC
I've got the same problem here, also with a courier imap mail server. I found out some points:

- Creating an account on a courier server and enabling the server side subscription of folders causes the inbox to be not synced. Creating another account with the exact same settings, except fully disabling the server side subscription works.

- Creating the account with the server side subscription will result in the following settings for the inbox (I used akonadiconsole):
  - All ACL permissions are disabled
  - The attribute "noselect" is set to "1"
  - The "Content types" lists only "inode/directory" but not "message/rfc822"
Setting some useful ACLs, deleting the "noselect" attribute, adding "message/rfc822" and manually staring a sync causes KMail to download the messages that are currently in the folder. Sadly this settings gets overwritten and after that no new mail gets loaded to the inbox without repeating the steps.

- I didn't test the problem on other mailservers, but I think it is an issue with the courier server. I am using courier 4.8 (Debian squeeze) with SSL encryption.

- The problem might be the same than in Bug 283841

- I also found some old kmail 1 bugs, that might be relevant: Bug 191280 , Bug 243318
Comment 6 francesco 2012-09-23 18:11:00 UTC
I have been experiencing the same problem (with kmail2, version 4.8.5), and after reading this
http://permalink.gmane.org/gmane.comp.kde.devel.pim/33336
I checked the courierimapsubscribed file on my server (where I run courier-imap).
The INBOX folder was not present, while all the other were as expected (INBOX.Sent and so on...)
It looks like Kmail1, Thunderbird and my webmail client (Roundcube) just assume that the INBOX folder is subscribed to and show all its email messages.
However, it seems that kmail2 does not subscribe to the folder and does not even give you the option to subscribe to it. Checking and unchecking it does not make any difference.

So what I did was to add it manually in my courierimapsubscribed file.
Then, after refreshing the folder list, kmail2 has been working fine, showing all the messages in my inbox.

Hope it helps. Obviously, this is only possible if you have access to the server hosting your mail.
Comment 7 Jarkko Sakkinen 2012-09-24 08:23:28 UTC
I do not experience this issue anymore with KDE 4.9 (kubuntu 12.04 + backports).
Comment 8 Myriam Schweingruber 2012-09-24 08:34:53 UTC
(In reply to comment #7)
> I do not experience this issue anymore with KDE 4.9 (kubuntu 12.04 +
> backports).

Thank you for the feedback, please feel free to reopen should this be reappearing with 4.9 or later.
Comment 9 JHF2442 2012-10-10 19:25:42 UTC
Same issue here with kde 4.9.2 (arch linux)
problem seems to be solved by "server side subscription" activated. Deactivating it and checking mail, all emails in the inbox appear.
previously, inbox was excluded from mail check : using akonadikonsole's debugger it showed that the query was to get alll subelements, and then query each of them recursively, but the INBOX itself was never queried
Comment 10 Frederik Gladhorn 2012-12-15 17:50:39 UTC
I have exactly the same on Kubuntu 12.10 - KMail2 4.9.3. My inbox would not sync until I disabled all server side subscriptions. I can try to help debugging if any additional information is needed.
It seems that for new imap accounts the server side subscription is enabled by default which makes this problem so much more visible compared to old setups where it was not.
Comment 11 Frederik Gladhorn 2012-12-15 17:52:42 UTC
*** Bug 283841 has been marked as a duplicate of this bug. ***
Comment 12 boris64 2013-03-03 12:10:05 UTC
This issue is still present for me in KDE-4.10. 
The proposed workaround from comment #6
(->https://bugs.kde.org/show_bug.cgi?id=284172#c6)
works for me. Thanks Francesco, you made my day.
Comment 13 123 2013-04-19 19:30:50 UTC
Still not working under KDE 4.10.1 and Fedora 18. Folders other than inbox sync fine with Kmail; Kmail's inbox, however, is empty, although there are plenty of messages on the server's inbox.
Comment 14 jbn10161 2013-04-29 13:58:39 UTC
This is not just a Courier problem, and it was not fixed in 4.9.

I just switched from Courier to Dovecot in order to avoid exactly this bug, but there was no change. This bug renders Kmail unusable. It should be a mission critical bug.

KDE 4.10.2
Comment 15 Jan Binder 2013-05-11 18:52:37 UTC
KDE 4.10.2, Debian experimental, amd64

For me, this happens with an IMAP account hosted on Courier-imap 4.8.0 with and without server side subscription enabled.

Mail cannot be moved or deleted from INBOX while subfolders of INBOX are not affected.

All other mail clients tested, including KMail1, work as expected.

Server information according to Akonadi:
IMAP4REV1
UIDPLUS
CHILDREN
NAMESPACE
THREAD=ORDEREDSUBJECT
THREAD=REFERENCES
SORT
QUOTA
IDLE
AUTH=PLAIN
ACL
ACL2=UNION
Comment 16 Kristopher Ives 2013-07-25 17:32:56 UTC
What solved it for me was unchecking "Server side subscription" although others are saying enabling that has fixed their issue :( Maybe something is being cached and toggling that is busting the cache?
Comment 17 Nejc 2013-10-15 10:09:31 UTC
Still present in 4.11.2; I cannot subscribe to INBOX (but can to subfolders). Checking it and applying won't do a thing. Other mail clients show INBOX as subscribed and work fine. subscriptions file in my maildir has INBOX listed as subscribed.

All other mail clients I've ever used work fine. Server is dovecot 1.2.9 on ubuntu 10.04 LTS.

Just fetching all mail is a BAD workaround - I have tons of mail in some folders I do not want to have synched and this option will synch everything.
Comment 18 Gerald 2014-04-25 19:36:35 UTC
Same problem here. Workaround works for me, but would be nice if it was fixed.
Comment 19 Marcus Hardt 2015-02-13 08:43:33 UTC
If this is related to courier imap, this may be a duplicate of bug 343825, which has a (serverside) workaround available.
Comment 20 Marc Richter 2015-08-14 12:22:22 UTC
(In reply to Kristopher Ives from comment #16)
> What solved it for me was unchecking "Server side subscription" although
> others are saying enabling that has fixed their issue :( Maybe something is
> being cached and toggling that is busting the cache?

I can confirm, after hiting this issue with courier-imap 4.16.0, KMail 4.14.6 and KDE 4.14.6, that disabling "Server side subscription" (the whole function; not only the subscription of the Inbox!) fixes it for me, too.

Thank you, Kristopher, for sharing that solution!
Comment 21 akhilesh 2016-01-26 05:57:08 UTC
(In reply to Kristopher Ives from comment #16)
> What solved it for me was unchecking "Server side subscription" although
> others are saying enabling that has fixed their issue :( Maybe something is
> being cached and toggling that is busting the cache?

Thanks, this fixed it for me too.
Comment 22 Denis Kurz 2017-01-14 13:39:40 UTC
Because of lack of activity here, and the fact that the bug was never observed for a more recent, Frameworks-based version of KMail (5.0 or later a.k.a. 15.08.0 or later), may I assume that this bug is fixed? Can anyone confirm it for a recent version?
Comment 23 Matthew Hall 2017-04-16 01:31:35 UTC
(In reply to Denis Kurz from comment #22)
> the bug was never
> observed for a more recent, Frameworks-based version of KMail (5.0 or later
> a.k.a. 15.08.0 or later), may I assume that this bug is fixed? Can anyone
> confirm it for a recent version?

Unfortunately, I am still seeing issues with this in Kmail 5.1.3, using postfix with dovecot (local delivery via procmail + dovecot deliver binary), with Maildir folders, where the root (aka INBOX) contains subdirectories which are additional Maildirs.

I noticed that when provisioning a new IMAP account, a whole ton of my folders and subfolders (i.e. every one of them which wasn't one of the Kmail-special ones you have to cross-link in the preferences, i.e. outbox, sent, trash, drafts, and templates), was not checked as subscribed in the server-side subscriptions folder list, so none of the most important folders were either appearing in the folder list, or getting their messages synced by default. Not even INBOX got subscribed properly, so none of your default message folder was even getting synced.

In general, when users are provisioning a new account, it's vitally important that every folder should get the server-side subscription enabled by default, because I honestly can't think of a reason why anyone wouldn't want that by default in the modern world.
Comment 24 Denis Kurz 2017-04-18 20:14:15 UTC
Re-setting to confirmed due to Comment 23
Comment 25 Francis Herne 2017-08-02 16:15:50 UTC
Still reproducible with KMail 5.5.3 (on Arch Linux).
Comment 26 Diego Gangl 2017-12-07 13:28:02 UTC
Still happening in 5.6.3 (KDE Neon). Disabling server-side subscriptions makes it work.
Comment 27 Yaohan Chen 2019-04-16 05:37:14 UTC
I'm also having this problem with one of my IMAP accounts.

According to this article about MS Outlook, some IMAP servers put all folders under the Inbox folder. Outlook actually has a "Root Folder" setting, which if set to Inbox, will make the other folders appear as top level.

https://www.msoutlook.info/question/619

So maybe the nested folder structure is not due to a bug in KMail but just how the servers behave? It would be nice to have a similar "Root Folder" setting though, so users can use their IMAP accounts in a consistent way.

I'm not sure if this is related to the problem where Server-Side Subscriptions must be turned off in order to view emails in the Inbox folder.
Comment 28 markuss 2019-12-01 17:14:04 UTC
*** Bug 343825 has been marked as a duplicate of this bug. ***