This forum has been archived. All content is frozen. Please use KDE Discuss instead.

kmail: Maildir '' for collection '' is invalid

Tags: kmail, maildir, invalid collection kmail, maildir, invalid collection kmail, maildir, invalid collection
(comma "," separated)
Rasputin
Registered Member
Posts
31
Karma
0
OS
Hi,

I am using kmail 4.7.2 and I imported the mails of my kmail 1.x installation via File -> Import Messages -> KMail maildirs and folder structure.

Now each time I access one of my local folders for the first time in a session an error message pops up saying "Local folders: Maildir '' for collection '' is invalid." Nevertheless the folder is displayed correctly, I can read messages in there and copy new ones into the folder. It's just this annoying message plus error sound.
And when I click the Check Mail button, I can as many error popups as I have local folders, which are quite a lot. And the cacaphony of several dozen error sounds played at the same time is *very* annoying.

Hope anyone can help me,

best regards,
rasputin
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
You can, as a workaround, disable checkign for local folders. If you right click on the local folders and select properties you will be able to disable checking (in that case, checks will occur on-demand, i.e. when you access them).


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
Rasputin
Registered Member
Posts
31
Karma
0
OS
Hi einar,

thanks for your reply. Actually these are the settings I am currently using, but they result in these error messages I described above. So I'd rather find a real solution for the problem.
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
Can you check if Akonadi knows about the right Maildir folders? In teh account page of KMail's settings you can edit parameters for all you resources including maildir folders. Can you report what's there or see whether they don't point to valid resources?


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
piedro
Registered Member
Posts
374
Karma
1
OS
I have exactly the same problem, no matter what the settings are - the error message is displayed every time. Aakonadi ressources are set properly (and removed/reestablished a few times just to to make sure!)

This happens since I upgraded to 4.7.3. (4.7.2 before)

I guess it's nothing severe - it's just a usual regression.
It will be solved in a few month, we should just be patient and wait.
Don't worry about it.

thx for reading, piedro
Rasputin
Registered Member
Posts
31
Karma
0
OS
einar wrote:Can you check if Akonadi knows about the right Maildir folders? In teh account page of KMail's settings you can edit parameters for all you resources including maildir folders. Can you report what's there or see whether they don't point to valid resources?

Good point, and I am slightly confused: my Local Folders resource points to /home/rara/.local/share/local-mail, but that folder is empty but the three empty subfolders new, cur and tmp, and I have no clue where my downloaded mails are stored. As far as I understand, akonadi should fetch the mails from the pop-servers, cache them in its database, but write them to disk at some point in time. And if not into the folder specified in the Local Folders resource, where else?

Piedro: calm music is what I am listening to at this very moment, but I like my problems solved and not just postponed ;)

Saluti, rasputin
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
If you check the folder with "show all files", you'll notice that the mail is there, with hidden folders. That's because Maildir uses "." as prefix for directories.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
Rasputin
Registered Member
Posts
31
Karma
0
OS
No, it's really not there. My instincts cause me to always type ls -la ;) Maybe that's the cause for my strange error messages, but I really have no clue how it could happen in first place and how to fix it. Do you have any ideas?
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
Unfortunately my setup is pretty atypical (converted in the 4.6 days) and I only keep Maildir for my local folders. Nevertheless, the mail should be somewhere. Try to look in .local or in .kde4.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
Rasputin
Registered Member
Posts
31
Karma
0
OS
The problem was indeed that the maildir folders were not present. I solved the issue by archiving Local Folders from inside kmail. This archive contained all maildir folders, even those which were not present on disk before. I continued with extracting the archive file and copying its contents into ~/.local/share/.local-mail-directory. This ended up with a second Local Folders directory as a subdirectory of Local Folders in kmail, which contained all my mails. Then I deleted the old folders from the top-level Local Folders folder which caused those error messages, and copied the complete folders from the archived Local Folders back to the top level Local Folders.
Unfortunately, this cost me the read/unread status of all my mail and I had to take half an hour to readjust my filter rules, but now kmail works perfectly.
The description above might seem a bit confusing, but in fact it's really straightforward.

Thanks for your help, I got some useful ideas from you!

Regards, rasputin
Asraniel
Registered Member
Posts
49
Karma
0
Is there any way to solve this that does not involve this quite complicated and time consuming procedure? For me it would be enough if i could "hide" the error, since everything seems to work, and its repeating itself 10+ times.

Edit: actually hidding might not do it. Folders like the trash are missing etc, so something is really wrong with my kmail. Is there some kind of "auto fix" feature for kmail?
NikosAlexandris
Registered Member
Posts
12
Karma
0
OS
I am hit by the same "buggy" behaviour as I am trying to re-build my system from the scratch once again after a long time.

Rasputin wrote:The problem was indeed that the maildir folders were not present.
Here too :(

Rasputin wrote:I solved the issue by archiving Local Folders from inside kmail. This archive contained all maildir folders, even those which were not present on disk before. I continued with extracting the archive file and copying its contents into ~/.local/share/.local-mail-directory. This ended up with a second Local Folders directory as a subdirectory of Local Folders in kmail, which contained all my mails.
I am trying to repeat what you did...

Rasputin wrote:Then I deleted the old folders from the top-level Local Folders folder which caused those error messages, and copied the complete folders from the archived Local Folders back to the top level Local Folders.
How? From inside Kmail(2) or manually (dolphin or cli)?

Rasputin wrote:Unfortunately, this cost me the read/unread status of all my mail and I had to take half an hour to readjust my filter rules, but now kmail works perfectly.
The description above might seem a bit confusing, but in fact it's really straightforward.
It is timeconsuming--is seems that there is no alternative sofar... ???

Rasputin wrote:Thanks for your help, I got some useful ideas from you!
Regards, rasputin
Thank you, Nikos
NikosAlexandris
Registered Member
Posts
12
Karma
0
OS
To whom it may concern,

in Linux, I found it quite useful to check if there are empty files (in ~/.local/share/.local-mail.directory) and check for duplicate files as follows:

Code: Select all
# navigate into the directory of interest
cd ~/.local/share/.local-mail.directory

# check for empty files
find . -type f -empty

# or check & delete
find . -type f -empty -delete


To search and delete duplicates Fslint (http://freecode.com/projects/fslint%20) is an excellent and easy-to-use tool. It can be quickly installed from the repository, that is
Code: Select all
sudo apt-get install fslint


I don't know how safe this is but it seems it helped me. If corrupted and empty files cause huge problems, couldn't Kmail(2) deserve advanced checking and deletion of such e-mails/files?
User avatar
mfraser
Registered Member
Posts
18
Karma
0
OS
I'm also getting this after importing my emails into KMail2. .local/share/local-mail just has 3 directories called cur, new and tmp with all the imported emails in .local-mail.directory.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
@mfraser: Have you scanned the imported emails for empty files which have been reported to cause this issue as documented above?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], mesutakcan, Sogou [Bot]