Hi list! Since a week I am testing with dovecot, and I must say, I like it a lot :) Keep up the good work :) I do have one questing regarding dovecot: If I login to a mailbox, and the mailbox does NOT exist, and the parent directory does not exist either, I will get disconnected, and dovecot claims it cannot create the directory. (eg: my user blah at test.com has mail directory /var/mail/t/te/test.com/blah/Maildir, and all directories up to /var/mail/t/te/ exist, dovecot does not create the directory test.com/ and on.) Is this by design, or should this be created by dovecot? The problem is solved as soon as the user receives his first email, since my MTA creates the directories... Thank you, Maikel Verheijen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://dovecot.org/pipermail/dovecot/attachments/20030325/30b1402a/attachment-0001.html>
On Tue, 2003-03-25 at 15:56, Maikel Verheijen wrote:> I do have one questing regarding dovecot: If I login to a mailbox, and > the mailbox does NOT exist, and the parent directory does not exist > either, I will get disconnected, and dovecot claims it cannot create > the directory. (eg: my user blah at test.com has mail directory > /var/mail/t/te/test.com/blah/Maildir, and all directories up to > /var/mail/t/te/ exist, dovecot does not create the directory test.com/ > and on.) > > Is this by design, or should this be created by dovecot?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: 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..
> 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://dovecot.org/pipermail/dovecot/attachments/20030326/e8650cad/attachment-0001.html>
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()