[Dovecot] Mixing mbox and maildir
Hi there.
I understood that in Dovecot 1.0 it should be possible to mix the usage of mbox and maildir mailboxes.
I just downloaded, built, and am testing dovecot-stable-20050304.
I'm a bit confused as to the terms of namespaces (haven't read that part of the RFC yet), but this does not seem related.
Anyway, when I try specifying:
default_mail_env = ~/mail/:INBOX=/var/mail/%u
On login I'm immediately disconnected, seeing something like:
dovecot: IMAP(user): Failed to create storage with data: ~/mail:INBOX=/var/mail/user
in the log file. This seems more like a bug to me (or maybe something in permissions I haven't noticed - but I've checked...)
Any way, according to the documentation, it will detect whether ~/mail/ is mbox or maildir - but would that enable having both mbox and maildir in that directory?
The goal is, to deploy Dovecot 1.0 at some time, while here there are users who have both maildir and mbox mailboxes (I.E. spool is mbox, ~/mbox is mbox, ~/mail contains some mbox mailboxes for small stuff that users want to be able to access even using /usr/bin/mail, and some larger maildir mailboxes (less critical, or high volume - e.g. mailing lists). How is that possible?
Thanks, -- Tom
P.S. Thanks again, Timo and rest of developers for this big piece of code - I maintain Dovecot 0.99 in another place and it's by far the most useful IMAP server yet.
-- 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.
- Tom Alsberg alsbergt@cs.huji.ac.il [03-05-2005 03:37]:
Hi there.
I understood that in Dovecot 1.0 it should be possible to mix the usage of mbox and maildir mailboxes.
http://www.dovecot.org/list/dovecot/2005-January/006104.html
As a side note, why aren't our archives searchable?
I submitted it for archiving at marc.theaimsgroup.com.
-Jon
-- Jon Nathan jon@rupture.net
Jon Nathan wrote:
- Tom Alsberg alsbergt@cs.huji.ac.il [03-05-2005 03:37]:
Hi there.
I understood that in Dovecot 1.0 it should be possible to mix the usage of mbox and maildir mailboxes.
http://www.dovecot.org/list/dovecot/2005-January/006104.html
Note that that's about letting some users use Maildir and some mbox, not letting the same user use both simultaneously. I doubt that's possible.
-- Magnus Holmgren
On Sat, 2005-03-05 at 10:37 +0200, Tom Alsberg wrote:
I understood that in Dovecot 1.0 it should be possible to mix the usage of mbox and maildir mailboxes.
I just wrote this: http://wiki.dovecot.org/MailLocation
On Sat, Mar 05, 2005 at 10:31:59PM +0200, Timo Sirainen wrote:
I just wrote this: http://wiki.dovecot.org/MailLocation
From what I read there, it seems pretty complicated, but I couldn't understand a straightforward way to do this - only with namespaces I could create another namespace for mbox, but then clients had to know...
Is there no way to just have Dovecot detect whether the mailbox is in maildir or mbox format on opening?
And what about the problem - that without prefixing mbox: it complains:
dovecot: IMAP(user): Failed to create storage with data: +~/mail:INBOX=/var/mail/user
Thanks, -- 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.
On 6.3.2005, at 13:48, Tom Alsberg wrote:
On Sat, Mar 05, 2005 at 10:31:59PM +0200, Timo Sirainen wrote:
I just wrote this: http://wiki.dovecot.org/MailLocation
From what I read there, it seems pretty complicated, but I couldn't understand a straightforward way to do this - only with namespaces I could create another namespace for mbox, but then clients had to know...
Yes, it'd have to be under mbox/ or something like that.
Is there no way to just have Dovecot detect whether the mailbox is in maildir or mbox format on opening?
There's no way for now.
And what about the problem - that without prefixing mbox: it complains:
dovecot: IMAP(user): Failed to create storage with data: +~/mail:INBOX=/var/mail/user
It means Dovecot couldn't detect if ~/mail was mbox or maildir. If it had inbox file or .imap/ directory, it would have been detected as mbox, if it had new/ directory it would have been detected as maildir.
On Sun, Mar 06, 2005 at 03:16:23PM +0200, Timo Sirainen wrote:
On 6.3.2005, at 13:48, Tom Alsberg wrote:
<snip /> Is there no way to just have Dovecot detect whether the mailbox is in maildir or mbox format on opening?
There's no way for now.
Are there any plans to add this option? How difficult would it be to change Dovecot to check the type on open? Any guidance on how to do that?
In the meanwhile I've checked a few other changes in Dovecot 1.0-stable, and it seems to work relatively well. However the possibility of mixing mbox and maildir is really missing.
Thanks, -- 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.
I don't think this... I'm using dovecot with mailbox format but if in the home directory of an user there is a folder named Maildir, then dovecot start to use automatically maildir format. The same can be done with procmail to deliver mails
Alfonso
-----Messaggio originale----- Da: dovecot-bounces@dovecot.org [mailto:dovecot-bounces@dovecot.org] Per conto di Tom Alsberg Inviato: lunedì 21 marzo 2005 7.13 A: Timo Sirainen; Dovecot Mailing List Oggetto: Re: [Dovecot] Mixing mbox and maildir
On Sun, Mar 06, 2005 at 03:16:23PM +0200, Timo Sirainen wrote:
On 6.3.2005, at 13:48, Tom Alsberg wrote:
<snip /> Is there no way to just have Dovecot detect whether the mailbox is in maildir or mbox format on opening?
There's no way for now.
Are there any plans to add this option? How difficult would it be to change Dovecot to check the type on open? Any guidance on how to do that?
In the meanwhile I've checked a few other changes in Dovecot 1.0-stable, and it seems to work relatively well. However the possibility of mixing mbox and maildir is really missing.
Thanks, -- 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.
On 21.3.2005, at 08:12, Tom Alsberg wrote:
On Sun, Mar 06, 2005 at 03:16:23PM +0200, Timo Sirainen wrote:
On 6.3.2005, at 13:48, Tom Alsberg wrote:
<snip /> Is there no way to just have Dovecot detect whether the mailbox is in maildir or mbox format on opening?
There's no way for now.
Are there any plans to add this option? How difficult would it be to change Dovecot to check the type on open? Any guidance on how to do that?
The problem is that currently the mailbox listing code is combined with the actual mailbox format handling code. They would have to be separated in some way so that the mailbox handling code is run only when mailbox is being opened. Except there would also have to be some kind of mailbox format specific filters in the listing code, so that nothing would be shown under "~/mail/foo" if ~/mail/foo/new (and cur and tmp?) exists.
On Mon, Mar 21, 2005 at 02:48:03PM +0200, Timo Sirainen wrote:
On 21.3.2005, at 08:12, Tom Alsberg wrote:
On Sun, Mar 06, 2005 at 03:16:23PM +0200, Timo Sirainen wrote:
On 6.3.2005, at 13:48, Tom Alsberg wrote:
<snip /> Is there no way to just have Dovecot detect whether the mailbox is in maildir or mbox format on opening?
There's no way for now.
Are there any plans to add this option? How difficult would it be to change Dovecot to check the type on open? Any guidance on how to do that?
The problem is that currently the mailbox listing code is combined with the actual mailbox format handling code.
Oh, I see...
Any plans to separate those to enable mixing of mailboxes at some point?
They would have to be separated in some way so that the mailbox handling code is run only when mailbox is being opened. Except there would also have to be some kind of mailbox format specific filters in the listing code, so that nothing would be shown under "~/mail/foo" if ~/mail/foo/new (and cur and tmp?) exists.
Why? There can be an hierarchy of mailboxes (a mailbox can contain sub-mailboxes, etc.)
I would more like say that if new, (and cur, and tmp?) exist, it will be treated as maildir, and only those subdirectories will not be shown...
-- 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.
On 21.3.2005, at 16:09, Tom Alsberg wrote:
They would have to be separated in some way so that the mailbox handling code is run only when mailbox is being opened. Except there would also have to be some kind of mailbox format specific filters in the listing code, so that nothing would be shown under "~/mail/foo" if ~/mail/foo/new (and cur and tmp?) exists.
Why? There can be an hierarchy of mailboxes (a mailbox can contain sub-mailboxes, etc.)
I would more like say that if new, (and cur, and tmp?) exist, it will be treated as maildir, and only those subdirectories will not be shown...
That's what I meant. But there needs to be a clean way to do that, without hardcoding the maildir support directly into it. Other formats than mbox and maildir will be supported later..
participants (6)
-
Alfonso Sparano
-
Johannes Berg
-
Jon Nathan
-
Magnus Holmgren
-
Timo Sirainen
-
Tom Alsberg