On Fri, May 11, 2007 at 04:50:41PM +0300, Timo Sirainen wrote:
Ideally have Dovecot be smart so that if the file exists then it is assumed to be MBOX and if the directory exists then it is assumed to be maildir. Has anyone done anything like this?
I was thinking about implementing this to v1.1
I've already asked about it in the past, but since it came again, I just wanted to add my wish for this (before I write a bigger message on another subject). That's one of the features we're most missing - mixing mboxes and Maildirs in the same namespace - that is due to the fact that many users use such mailers like pine, mutt, etc. which support it, and choose to keep some of their bigger mailboxes as maildirs and their smaller ones as mbox, and except for at the time of creation, it's relatively transparent.
Another wish would be a better form of cascading - subfolders as subdirectories, instead of this awkward Maildir++ dot-separated format.
These two together will save me (and some user users who use IMAP in addition to mutt or pine) the need to create two directory full of symbolic links to access thei mail through IMAP.
but it's not so easy, so I'm not sure.
Having looked again at the code, this does indeed not seem all that easy. The code handling the mailbox namespace browsing seems too tightly integrated with the code handling the mailboxes themselves.
I suppose it would be best if those two were separated, so a namespace module will handle issues like "what subfolders does the folder Foo have" and "what is the physical path for folder Foo.Bar", while the mailbox module will handle issues like "what messages are there in folder whose physical path is mail/.Foo.Bar" and "fetch the message with UID 117 from the folder whose physical path is mail/.Foo.Bar". The mailbox access module will query the namespace module to obtain those paths.
I'm not sure how much work this restructuring would be, but it will definitely be useful, as it will enable adding different namespace modules (with more flexibility) and different folder formats separately in a cleaner way.
Which brings the subject of the next message I'm about to write to this list.
-- Tom
-- Tom Alsberg - hacker (being the best description fitting this space) Web page: http://www.cs.huji.ac.il/~alsbergt/ DISCLAIMER: The above message does not even necessarily represent what my fingers have typed on the keyboard, save anything further.