[Dovecot] Dovecot unable to locate mailbox

IVO GELOV (CRM) ivo at crm.walltopia.com
Tue Jan 17 11:59:14 EET 2012


On Mon, 16 Jan 2012 14:38:44 +0200, Jason X, Maney <jsxmoney at gmail.com> wrote:

> Dear all,
>
> I hope someone can point me in the right direction. here. I have setup my
> Dovecot v2.0.13 on Ubuntu 11.10. The logs tells me that the mail location
> has failed as follows:
>
> =========
> Jan 16 14:18:16 myservername dovecot: pop3-login: Login: user=<userA>,
> method=PLAIN, rip=aaa.bbb.ccc.ddd, lip=www.xxx.yyy.zzz, mpid=1360, TLS
> Jan 16 14:18:16 myservername dovecot: pop3(userA): Error: user molla:
> Initialization failed: mail_location not set and autodetection failed: Mail
> storage autodetection failed with home=/home/userA
> Jan 16 14:18:16 myservername dovecot: pop3(userA): Error: Invalid user
> settings. Refer to server log for more information.
> =========
>
> Yet my config also come out strangely as below:
>
> # path given in the mail_location setting.
> #   mail_location = maildir:~/Maildir
> #   mail_location = mbox:~/mail:INBOX=/var/mail/%u
> #   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
> mail_location = maildir:~/Maildir
> # explicitly, ie. mail_location does nothing unless you have a namespace
>   # mail_location, which is also the default for it.

Hi, Jason.

I will describe my configuration and probably you will find some usefull information.
I am using Postfix as MTA and have configured Dovecot to be LDA. I have several domains,
so I am using the following folder schema:

/var/mail/vhosts = the root of the mail storage
/var/mail/vhosts/domain_1 = first domain
/var/mail/vhosts/domain_1/user_1 = first mailbox in this domain
....
/var/mail/vhosts/domain_2 = another domain
/var/mail/vhosts/domain_2/user_1 = first mailbox in the other domain

This is achieved with the following setting in mail.conf:

mail_location = maildir:/var/mail/vhosts/%d/%n

But since I do not want to manually go and create the corresponding folders each time
I add new user (I manage accounts through a MySQL table), I also use the following
setting in lda.conf:

lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes

Perhaps you only need to add the latter settings in lda.conf and everything should run fine.

Best wishes,
IVO GELOV



More information about the dovecot mailing list