[Dovecot] Failed to create storage with data:

Matthieu Imbert matthieu.imbert at ens-lsh.fr
Wed Apr 13 18:16:37 EEST 2005


Chris Wakelin wrote:
 > On Wed, 13 Apr 2005 16:44:43 +0200 Matthieu Imbert
 > <matthieu.imbert at ens-lsh.fr> wrote:
 >
 >>Hi, i'm using dovecot-1.0-stable.
 >>
 >>All my mail accounts are virtual accounts that come from pam with the
 >>following configuration in auth_default:
 >>   passdb = pam
 >>   userdb = static uid=5000 gid=5000 home=/var/mail/vhost/example.com/%n
 >>mail=/var/mail/vhost/example.com/%n
 >>
 >>for a user foo, if the directory /var/mail/vhost/example.com/foo already
 >>exists, then all is ok, but if the directory doesn't exists, it seems
 >>dovecot is unable to create it "on the fly". I get the following error
 >>message:
 >>   Failed to create storage with data: /var/mail/vhost/example.com/foo
 >>
 >>i'm quite sure it is not a permission related problem (i made
 >>/var/mail/vhost/example.com world writable to be sure).
 >>
 >>I'm currently trying to understand the maildir code... But could someone
 >>tell me if the maildir directory should exist for dovecot to work ?
 >>
 >>In the case that the answer is yes, i would say in advance that it's a
 >>problem for sites hosting a lot of virtual users, since it means that
 >>these users must receive at least one mail for their mail account to
 >>work correctly (i use postfix as MTA, and if the user's maildir doesn't
 >>exist, postfix takes care of creating it). I'm not very fond of
 >>solutions with scripts taking care of creating users.
 >
> Do you have a default_mail_env set up? Does it work with
> 
> default_mail_env = maildir:/var/mail/vhost/example.com/%n
> 
> ?
> 
> It looks to me like it should create the directory if missing; see 
> src/lib-storage/index/maildir/maildir-storage.c in maildir_create()
> 
> Mind you, I'm not at all familiar with the maildir code yet ...
> 
> Best Wishes,
> Chris

Yes i have this default_mail_env set (though i forgot to mention it my 
initial question)



More information about the dovecot mailing list