Bug 294215 - Maildir resource doesn't see subfolders.
Summary: Maildir resource doesn't see subfolders.
Status: CONFIRMED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Maildir Resource (show other bugs)
Version: 5.4.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-16 09:24 UTC by Peter Lewis
Modified: 2017-01-14 22:05 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Akonadi errors in ~/.xsession-errors (9.24 KB, text/plain)
2012-08-27 14:14 UTC, Thiago Jung Bauermann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lewis 2012-02-16 09:24:59 UTC
Version:           4.8 (using KDE 4.8.0) 
OS:                Linux

Hi,

I have a maildir where the structure is nested in subfolders. (It was generated using offlineimap). It looks like this:

 mail
  ├── folder1
  │   ├── cur
  │   ├── new
  │   └── tmp
  ├── folder2
  │   ├── cur
  │   ├── new
  │   └── tmp
  ├── cur
  ├── new
  └── tmp



But, if I point Kmail at the root of this using the maildir resource, it only sees the top level folder, none of the subfolders (as it does in, e.g. mutt).

Thanks.

Reproducible: Always

Steps to Reproduce:
Point the maildir resource at a nested maildir folder.

Actual Results:  
Only the top level folder is shown - no subfolders.

Expected Results:  
The resource should provide the full folder structure.
Comment 1 Laurent Montel 2012-02-16 13:24:06 UTC
How do you create resource ?
Comment 2 Peter Lewis 2012-02-16 14:27:21 UTC
I was in KMail (4.8.0) and did Settings -> Configure KMail -> Accounts -> Add. Selected Maildir and put in the path to the root of the maildir (i.e. ~/mail).
Comment 3 Laurent Montel 2012-02-16 17:05:06 UTC
When you use 'search message dialogbox" it works or it told you that nepomuk doesn't work ?

I tested on a machine where nepomuk doesn't work and I have your bug

I tested on my second machine where nepomuk work and it works fine.
Comment 4 Peter Lewis 2012-02-17 13:00:47 UTC
Ah, yes, when I try to search, I get the error that nepomuk doesn't work. I have it enabled in systemsettings, and also enabled for email indexing (though not for file indexing). What should I look at to fix it?

Thanks.
Comment 5 Peter Lewis 2012-02-18 08:42:56 UTC
I just tested this on a different machine. On this one, I get the same behaviour in terms of the Maildir resource (it doesn't see subfolders), but nepomuk seems at least somewhat operational. If I hit 's' to search in a folder, I get the search dialog, but it always returns no messages found for any search. If I have a look in top, I see that virtuoso-t is using >100% of the CPU for a long time.
Comment 6 Peter Lewis 2012-02-18 08:57:04 UTC
I tried looking into nepomuk a little more, and following some instructions on the wiki, stopped it and akonadi, deleted the nepomuk store and then restarted both nepomuk then akonadi. First thing is the bug is still present.

Secondly, I noticed some errors in nepomuk when it started up:

[/usr/bin/nepomukservicestub] "/usr/bin/nepomukservicestub(32039)" Soprano: "SQLExecDirect failed on query 'sparql select distinct ?r ?reqProp1 (bif:concat(bif:search_excerpt(bif:vector('Guardian'), ?v2))) as ?_n_f_t_m_ex_ where { { ?r <http://akonadi-project.org/ontologies/aneo#akonadiItemId> ?reqProp1 . ?r <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#me' (iODBC Error: [OpenLink][Virtuoso iODBC Driver][Virtuoso Server]SQ074: Line 1: syntax error at '#')"

This is repeated several times, and then I get:

[/usr/bin/nepomukservicestub] "/usr/bin/nepomukservicestub(32039)" Soprano: "Invalid iterator."

In fact, after this, search results are still empty.

I'm not sure I understand why all this full-text-search layer would be needed just for the resource to see subfolders :-/
Comment 7 Peter Lewis 2012-02-18 13:16:28 UTC
Sorry for the several replies, but here's a bit more info that may be useful. After a while, I noticed that hitting 's' no longer even brought up the search box, now I get the message that nepomuk is not available instead. The nepomuk server process output the following:

ProcessControl: Application '/usr/bin/nepomukservicestub' stopped unexpected (Process crashed)
Application '/usr/bin/nepomukservicestub nepomukstorage' crashed to often. Giving up!

Nepomuk does not look too healthy...
Comment 8 Thiago Jung Bauermann 2012-08-27 14:05:14 UTC
I have the same problem on KDE 4.9 and Akonadi 1.8.0 (Kubuntu packages).
The maildir was created with offlineimap as well, with the following configuration:

[Repository ltc-local]
type = Maildir 
localfolders = /home/bauermann/trabalho/mail/ltc
sep = /

My machine with functioning Nepomuk. And in any case, it would be very strange if supporting Maildir subfolders depended on Nepomuk.

On a side note, if it is relevant: mail search doesn't work. I search for a keyword I know is in the body of a message and the message doesn't show up (I selected the option to search in body of messages of course).
Comment 9 Thiago Jung Bauermann 2012-08-27 14:14:17 UTC
Created attachment 73503 [details]
Akonadi errors in ~/.xsession-errors

I'm attaching the error messages mentioning Akonadi that I found in ~/.xsession-errors.
Comment 10 András Manţia 2012-10-13 08:06:44 UTC
The layout you describe there is not supported by KMail. KMail supports the Maildir++ folder layout, see http://wiki.dovecot.org/MailboxFormat/Maildir#Directory_Structure .
The original maildir spec doesn't even have subfolder support.
I'll close now as WONTFIX, but if you still see as something that we MUST support, please open a wish item for it. I probably won't work on it, but I'm open for patches if any other developer steps up and writes support for that.

PS: This is completely unrelated to nepomuk.
Comment 11 Peter Lewis 2012-10-22 09:58:42 UTC
Thanks for the clarification, András.

But, I'm not sure that KMail 4.9.2 follows that spec correctly.

Here's my test case:

1) I have a Maildir folder called ~/mail/Personal. Within it are cur,new and tmp. Note that ~/mail is NOT a maildir, just a directory to hold maildirs for different accounts.

2) I create an account using the akonadi Maildir resource in KMail, pointing to ~/mail/Personal. It shows the mails in the Personal account in the message view correctly.

3) I create a folder in KMail, as a subfolder of Personal (right click Personal, add folder), and call it Test.

4) The new folder is created as ~/mail/.Personal.directory/Test

According to the link to the Maildir++ spec you linked to, it should be ~/mail/Personal/.Test and everything should be kept inside ~/mail/Personal.

This appears to be a violoation of the spec to me. Can you comment?

Thanks.
Comment 12 Thiago Jung Bauermann 2012-12-21 03:45:44 UTC
It seems to me that KMail doesn't follow the maildir spec. Hence, I think this bugzilla should be reopened. Or, if it stays as WONTFIX then KMail needs to stop claiming that it supports Maildir.

What do you think?
Comment 13 András Manţia 2012-12-21 06:46:43 UTC
Peter: you're right, the subfolders should be named indeed .Folder, not Folder. I'm not sure how I interpreted wrongly the spec. :( The current layout is the layout used by KMail1, but I will try to come up with a solution to support both the current structure and the one described by you.
Comment 14 Peter Lewis 2013-08-12 18:20:40 UTC
Hi, just wondering if there is any progress on implementing the solution to this bug? Thanks :-)
Comment 15 Peter Lewis 2013-08-23 23:15:54 UTC
Just a thought, but I wondered if it might be easier to just have a new resource for Maildir (which correctly follows the spec), and then call the current one something else (KMaildir, or similar). Might make more sense than trying to come up with a resource to deal with both cases. Let me know if I can help.
Comment 16 Denis Kurz 2016-09-24 20:41:07 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 17 Andrey Bondarenko 2016-12-16 09:09:23 UTC
I can reproduce this bug in kdepim-runtime version 15.12.3 (kubuntu 16.04)
Comment 18 Denis Kurz 2017-01-08 00:27:12 UTC
Confirmed due to comment 17.
Comment 19 kramski 2017-01-14 16:06:33 UTC
I can confirm this bug for KMail 5.4.1 (KDE Applications 16.12.1.) for a newly added maildir folder structure (which is a copy of an existing one used by KMail itself).

I can even move Mails into its root folder, so the resource isn't completely broken. Just all subfolders are missing.

For the existing maildir resource, I still suffer from bug 320529 (https://bugs.kde.org/show_bug.cgi?id=320529) since Akonadi 16.12.0-1 / KMmail 5.4.0, which may be related.
Comment 20 Boian Berberov 2017-01-14 22:05:29 UTC
Exactly the same as Comment 19, but on OpenSUSE.  Are we supposed to use the mbox format for storing mail locally?