[dovecot] Re: mailbox problem
Hmm. Unless you're using one UID for everyone, those directories would have be to be created as root. Also test.com should be created with different owner as blah and blah/Maildir. Maybe I could add a new setting for this, but I'm not sure how to do it without making it too kludgy. There would have to be separation of where user directory structure starts, and uid/gid settings what to use for created directories before them. Something like:
I do use 1 UID and 1 GID for everyone. Would that be more simple?
mail_global_dir = /var/mail/t/te/%d mail_global_uid = root mail_global_gid = mail mail_user_dir = /var/mail/t/te/%d/%n
Would be better if the mail_user_dir didn't have to be set at all since it's already in mail_default_env, but the user directory has to be created while still root, and parsing mail_default_env there is kludgy too. Or maybe:
mail_global_dir = /var/mail/t/te/%d/%n
And the last directory would always be assumed to be user directory. That would prevent creating /var/mail-like shared directories though, but I guess there's no need to create those..
Maybe there could be a "toggle" to do or don't create the dirs, so you don't need the mail_global_dir setting for "normal" use.
My idea was to check the full path to the mailbox, and to create the nonexisting part if necessary. At that point you DO have the full path to the mailbox/maildir, and you can create it, right?
Kind regards,
Maikel Verheijen.
On Wed, 2003-03-26 at 10:54, Maikel Verheijen wrote:
Hmm. Unless you're using one UID for everyone, those directories would have be to be created as root. Also test.com should be created with different owner as blah and blah/Maildir.
I do use 1 UID and 1 GID for everyone. Would that be more simple?
For your case, yes..
Maybe there could be a "toggle" to do or don't create the dirs, so you don't need the mail_global_dir setting for "normal" use.
The toggle would be just not to set mail_global_dir :)
My idea was to check the full path to the mailbox, and to create the nonexisting part if necessary. At that point you DO have the full path to the mailbox/maildir, and you can create it, right?
Yes, but normally you also don't have permissions to create the directories at that point. I'm not sure if I want to add extra code just for one-uid-for-everyone case. But maybe this could be useful for other cases too .. Such as one-uid-per-domain, or if Maildir isn't directly under home dir. I guess I'll add code for this. If you want some temporary kludges you could call the mkdir()s at end of src/lib-storage/index/maildir/maildir-storage.c:maildir_create()
participants (2)
-
Maikel Verheijen
-
Timo Sirainen