[Dovecot] problems with migration to Maildir
I'm attempting to use Maildir and mbox together until I can finish migrating all mailboxes and figure out issues I'm having with a couple other mailboxes. But, I want to officially start using Maildir as the primary msg. store. Now...when I configure Dovecot as follows, it creates new folders in the ~/mail folder, which is where my mboxes reside:
#default_mail_env = #default_mail_env = mbox:~/mail/:INBOX=~/mbox #default_mail_env = mbox:~/:INBOX=~/mbox #default_mail_env = mbox:~/mail:INBOX=~/mbox default_mail_env = maildir:~/Maildir
#namespace private { # separator = / # inbox = yes # prefix = # location = mbox:~/mail:INBOX=~/mbox #} #namespace private { # separator = / # prefix = "Maildir/" # location = maildir:~/Maildir #}
namespace private { separator = / inbox = yes location = maildir:~/Maildir } namespace private { separator = / location = mbox:~/mail }
I would like to have access to the mbox hierarchy, but I want all new folders by default created in ~/Maildir. How do I go about acheiving this?
Thanks, Frank
On Sat, 2005-03-12 at 08:39 -0600, F. Even wrote:
namespace private { separator = / inbox = yes location = maildir:~/Maildir } namespace private { separator = / location = mbox:~/mail }
I would like to have access to the mbox hierarchy, but I want all new folders by default created in ~/Maildir. How do I go about acheiving this?
If you don't want to give some prefix to mbox, but you'd want Dovecot to automatically figure out in which namespaces the mailboxes are.. Sorry, not possible. Perhaps you could do that by changing the code (some stat()ing in namespace_find() might do it).
Timo Sirainen wrote:
On Sat, 2005-03-12 at 08:39 -0600, F. Even wrote:
namespace private { separator = / inbox = yes location = maildir:~/Maildir } namespace private { separator = / location = mbox:~/mail }
I would like to have access to the mbox hierarchy, but I want all new folders by default created in ~/Maildir. How do I go about acheiving this?
If you don't want to give some prefix to mbox, but you'd want Dovecot to automatically figure out in which namespaces the mailboxes are.. Sorry, not possible. Perhaps you could do that by changing the code (some stat()ing in namespace_find() might do it).
Well...I had a prefix the second namespace, and it was appending the name of the prefix to the beginning of each folder. It didn't work right, so I removed the prefix and everything looked fine, nice and unified even...but I didn't understand why by default it was trying to create folders in the mbox hierarchy.
I think I figured out the issue though...I had removed the "prefix" completely from the first definition, that might have caused the problem, because it works as expected with this configuration:
namespace private { separator = / inbox = yes prefix = location = maildir:~/Maildir } namespace private { separator = / prefix = "z_mbox/" location = mbox:~/mail }
Thanks for your help.
Frank
F. Even wrote:
Timo Sirainen wrote:
On Sat, 2005-03-12 at 08:39 -0600, F. Even wrote: I think I figured out the issue though...I had removed the "prefix" completely from the first definition, that might have caused the problem, because it works as expected with this configuration:
namespace private { separator = / inbox = yes prefix = location = maildir:~/Maildir } namespace private { separator = / prefix = "z_mbox/" location = mbox:~/mail }
Is there any way to disable the IMAP lookup for the second namespace if you make it hidden? Some users don't need the old mail folder at all, so what I had did was delete that folder from their accounts, then added the "hidden = yes" to that second namespace (the mbox one), yet when an account that did not have that namespace configured went to check his e-mail, imap through off the following error:
Mar 13 01:45:37 cerebus dovecot: imap-login: Login: user [ip.ad.dr.es] Mar 13 01:45:37 cerebus dovecot: IMAP(user): Invalid mbox path /home/user/mail: No such file or directory Mar 13 01:45:37 cerebus dovecot: IMAP(user): Failed to create storage for 'z_mbox/' with data: mbox:/home/user/mail Mar 13 01:45:37 cerebus dovecot: child 38630 (imap) returned error 89 Mar 13 01:48:38 cerebus dovecot: imap-login: Login: user [ip.ad.dr.es]
The account should not be seeing that namespace by default...so I'm not sure why the server insists on denying the client access due to not having the necessary folders in their $HOME to be compatible with that namespace. I've since created an empty folder in each of the directories to silence the alerts...but somewhat annoying as only a couple users really need to use the "legacy namespace."
Thanks, Frank
On Sun, 2005-03-13 at 02:37 -0600, F. Even wrote:
Mar 13 01:45:37 cerebus dovecot: imap-login: Login: user [ip.ad.dr.es] Mar 13 01:45:37 cerebus dovecot: IMAP(user): Invalid mbox path /home/user/mail: No such file or directory Mar 13 01:45:37 cerebus dovecot: IMAP(user): Failed to create storage for 'z_mbox/' with data: mbox:/home/user/mail Mar 13 01:45:37 cerebus dovecot: child 38630 (imap) returned error 89 Mar 13 01:48:38 cerebus dovecot: imap-login: Login: user [ip.ad.dr.es]
The account should not be seeing that namespace by default...so I'm not sure why the server insists on denying the client access due to not having the necessary folders in their $HOME to be compatible with that namespace. I've since created an empty folder in each of the directories to silence the alerts...but somewhat annoying as only a couple users really need to use the "legacy namespace."
I think it's better to show errors than hide them. I don't think hidden namespaces should by default be treated as unimportant and silently failing if there are problems. Perhaps a new flag for namespaces to ignore them if they can't be initialized.
Timo Sirainen wrote:
On Sun, 2005-03-13 at 02:37 -0600, F. Even wrote:
Mar 13 01:45:37 cerebus dovecot: imap-login: Login: user [ip.ad.dr.es] Mar 13 01:45:37 cerebus dovecot: IMAP(user): Invalid mbox path /home/user/mail: No such file or directory Mar 13 01:45:37 cerebus dovecot: IMAP(user): Failed to create storage for 'z_mbox/' with data: mbox:/home/user/mail Mar 13 01:45:37 cerebus dovecot: child 38630 (imap) returned error 89 Mar 13 01:48:38 cerebus dovecot: imap-login: Login: user [ip.ad.dr.es]
The account should not be seeing that namespace by default...so I'm not sure why the server insists on denying the client access due to not having the necessary folders in their $HOME to be compatible with that namespace. I've since created an empty folder in each of the directories to silence the alerts...but somewhat annoying as only a couple users really need to use the "legacy namespace."
I think it's better to show errors than hide them. I don't think hidden namespaces should by default be treated as unimportant and silently failing if there are problems. Perhaps a new flag for namespaces to ignore them if they can't be initialized.
I completely understand that. My only concern was that random users were querying a namespace that was hidden from them as the server was trying to deliver it...although it was never going to be shown to them. Not a big deal, I suppressed the error by recreating the folder hierarchy...but if not a big deal, maybe something to consider modifying in future releases.
Frank
participants (2)
-
F. Even
-
Timo Sirainen