Bug 60059 - don't treat non-mbox files as mboxes
Summary: don't treat non-mbox files as mboxes
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: maildir (show other bugs)
Version: 1.5.2
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-19 14:35 UTC by Aidan Delaney
Modified: 2009-12-18 17:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aidan Delaney 2003-06-19 14:35:39 UTC
Version:           1.5.2 (using KDE 3.1.2)
Installed from:    Gentoo
Compiler:          gcc version 3.2.2
OS:          Linux (i686) release 2.4.21

A file stored in ~/Maildir is interpreted as a folder in the Kmail UI but should be ignored.

How this was found:
	I switched from Kmail to evolution (and back again :).  Evolution leaves a subdir.ev-summary in the top-level ~/Maildir file for each subdit in ~/Maildir.  This means that users cannot switch back from evolution to Kmail.

How to fix:
	I presume a simple stat on the enteries in ~/Maildir will tell if they are files or folders.  Files should be ignored - as per the maildir spec.
Comment 1 Stephan Kulow 2003-09-24 07:16:46 UTC
can you describe the exact layout? I'm not aware of kmail using ~/Maildir, but ~/Mail 
and there files can be mboxes too 
Comment 2 Stephan Kulow 2003-09-24 09:25:09 UTC
found the ~/Maildir (never used it though), but that still leaves the question where evolution 
puts these files. Because we fixed one bug in maildir reading where it saw extra folders that 
weren't 
 
Comment 3 Thilo Bangert 2004-02-09 22:46:08 UTC
how to reproduce:
create a new folder in kmail called 'test' - type maildir
create a new subfolder to 'test' called 'test2' - type maildir
close kmail

in a shell
$ cd ~/Mail/.test.directory/
$ touch somefile

open kmail
'somefile' will be a new and empty folder under 'test'

best regards
Thilo
Comment 4 Malte S. Stretz 2004-02-09 23:10:02 UTC
Thilo: That's expected behaviour. You created the Maildirs
  ~/Mail/test/{cur,new,tmp}
  ~/Mail/.test.directory/test2/{cur,new,tmp}
and an mbox
  ~/Mail/.test.directory/somefile

The reason for this is that the Maildir "spec" doesn't allow subfolders inside Maildirs themselves. So KMail (and other MUAs) have to do it this way. I don't have the faintest idea how evo does the sub-Maildir handling.

HTH,
Malte
Comment 5 Thilo Bangert 2004-02-09 23:42:48 UTC
> Thilo: That's expected behaviour.

YMMV

> You created the  
> Maildirs
>   ~/Mail/test/{cur,new,tmp}
>   ~/Mail/.test.directory/test2/{cur,new,tmp}

true

> and an mbox
>   ~/Mail/.test.directory/somefile

no - i created a file. try copying a mp3 file into one of the subdirs. 
in kmail it will also be recognised as a mbox type folder. (it appears 
to be empty - go ahead and delete it ):

> The reason for this is that the Maildir "spec" doesn't allow
> subfolders inside Maildirs themselves.

that is the reason for the .foldername.directory folder - not for kmail 
interpreting every file in that folder as an mbox file...

i agree though, the .foldername.directory has nothing todo with the 
maildir spec

> So KMail (and other MUAs) have 
> to do it this way. I don't have the faintest idea how evo does the
> sub-Maildir handling.
>
> HTH,
> Malte

Comment 6 Ingo Klöcker 2004-02-10 13:57:25 UTC
.foldername.directory directories are KMail's location for storing subfolders of folders. All directories in a .folder.directory will be treated as maildir folders (in case they contain cur/, new/ and tmp/ folders) and all non-hidden files will be treated as mbox. Note that KMail ignores hidden files. In Unix it's common to store data which is to be ignored by other programs in hidden files. If Evolution doesn't follow this unwritten "law" then it's Evolution's fault. KMail follows this "law" because all KMail specific files in ~/Mail are hidden files.

Ignoring non-hidden files which don't seem to be mbox files is a feature request.
Comment 7 Malte S. Stretz 2004-02-10 15:03:00 UTC
To make clearer what I meant: The file in the sample was created in the ~/Mail/.test.directory, not the Maildir ~/Mail/test/ itself. So if KMail interpreted ~/Mail/test/somefile as an mbox inside a Maildir this was indeed a bug. Which it doesn't, any file created beneath the {cur,new,tmp} stuff is ignored as it should be.

I think I halfways understood the problem the original bug was about: It looks like evo uses the ~/Maildir as the inbox. So ~/Maildir is a Maildir as used by qmail, *not* a place for further mail storage as ~/Mail (with the subfolders {inbox,drafts,etc}) is in KMail. So if you tell KMail that evo/qmail's ~/Maildir is your mail storage place, it can't work. I don't have the faintest idea where evo would store its other folders though :)
Comment 8 Björn Ruberg 2009-12-18 17:53:53 UTC
Reads as if there is nothing more to do here.