[Dovecot] Failed to create storage with data:

Matthieu Imbert matthieu.imbert at ens-lsh.fr
Wed Apr 13 19:36:06 EEST 2005


Chris Wakelin wrote:

> I'm wondering whether your "mail=" should have "maildir:" in it, i.e.
> "mail=maildir:/var/mail/vhost/example.com/%n" or maybe it should not 
> be there at all?
> 
> The error seems to come from src/imap/namespace.c (but I was tracing 
> the wrong mail_storage_create_with_data() call before). The lines
> 
> mail = getenv("MAIL");
>         if (mail == NULL) {
>                 /* support also maildir-specific environment */
>                 mail = getenv("MAILDIR");
>                 if (mail != NULL)
>                         mail = t_strconcat("maildir:", mail, NULL);
>         }
> 
> seem to suggest that MAIL should have "maildir:" in it for maildirs.
> 
> Best Wishes,
> Chris
> 
> On Wed, 13 Apr 2005 17:16:37 +0200 Matthieu Imbert 
> <matthieu.imbert at ens-lsh.fr> wrote:
> 
> 
>>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
> 
> 
> --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
> Christopher Wakelin,                                c.d.wakelin at reading.ac.uk
> IT Services Centre, The University of Reading,       Tel: +44 (0)118 378 8439
> Whiteknights, Reading, RG6 2AF, UK                   Fax: +44 (0)118 975 3094
> 
> 

Here's what i've understood so far (these are hypotheses because i don't 
really now how to trace the code, i don't know gdb enough):

- The message is emitted from src/pop3/main.c line 179, because 
mail_storage_create_with_data returned a NULL pointer

- mail_storage_create_with_data (in src/lib-storage/mail-storage.c line 
  114) returns NULL because the call from mail_storage_create line 129 
returned NULL

- mail-storage-create (in src/lib-storage/mail-storage.c line 72) return 
NULL because the function pointed to by list->storage->create returns 
NULL. I guess this function pointer points to maildir_create in 
src/lib-storage/index/maildir/maildir-storage.c line 33

- i don't know why maildir-create would return NULL...

reading the code from verify_inbox, create_maildir and mkdir_verify (in 
src/lib-storage/index/maildir/maildir-storage.c), it really seems that 
the directory should be automatically created, though i still don't 
fully understand the execution path which is taken.

Thanks in advance for any help

also if someone can briefly explain me how i can trace it with gdb, i 
would appreciate. I know how to launch a single executable with gdb, but 
in this case, gdb needs to "attach" to a process which is spawned by the 
main dovecot process, and i don't know how to do it.

-- 

    \|||/
    (o o)                              Matthieu Imbert
ooO-(_)-Ooo------------------------------------------
              équipe administration réseau et systèmes
Ecole normale superieure lettres et sciences humaines
15, Parvis René Descartes BP 7000 69342 LYON cedex 07
tél 0437376127, secrétariat 0437376122 fax 0437376123
contact équipe réseau et systèmes <reseau at ens-lsh.fr>
        contact personnel <matthieu.imbert at ens-lsh.fr>
-----------------------------------------------------


More information about the dovecot mailing list