[Dovecot] Dovecot doesn't seem to read userdb for the first delivery

phuhimself at phunehehe.net phuhimself at phunehehe.net
Thu Jan 2 09:45:45 EET 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hello List,

First of all, this is my first post so please bear with me if I miss 
something.

I'm using Postfix with Dovecot 2.0.19 as the LDA. The home directory is 
of the
form `/var/mail/virtual/<domain>/<username>`. The mail directory is 
under the
home directory and named `mail`. `mail_location` is left empty, and 
userdb is
specified using SQL:

user_query = SELECT uid     AS uid, \
                     gid     AS gid, \
                     homedir AS home, \
                     maildir AS mail \
              FROM users WHERE email = '%u'

Everything had been fine, until I added a new user. In the log, Dovecot
complains that it doesn't have permission to create the mail directory 
(email
address replaced):

> Jan 2 05:46:19 mail1 dovecot: lda(test at test.com): Error: user 
> test at test.com:
> Initialization failed: Initializing mail storage from mail_location 
> setting
> failed: mkdir(mail) in directory /var/spool/postfix failed: Permission 
> denied
> (euid=5000(virtual) egid=5000(virtual) missing +w perm: 
> /var/spool/postfix,
> dir owned by 0:0 mode=0755)

Sometimes it complains about /run/dovecot instead of /var/spool/postfix, 
but I
think that doesn't really matter. I think not specifying `mail_location`
confused Dovecot, as explained in [MailLocation][1]. When I put in the 
right
value for `mail_location` the error went away.

What I don't understand is, it is said in the [same document][1] that 
the
userdb field `mail` will override `mail_location` anyway. I would think 
that I
can skip `mail_location` if I specify userdb `mail` for all users. Is 
the
document wrong?

Thanks,
Phu

[1]: http://wiki2.dovecot.org/MailLocation
-----BEGIN PGP SIGNATURE-----
Version: OpenPGP.js v.1.20131017
Comment: http://openpgpjs.org

wsFcBAEBCAAQBQJSxRknCRD8UQvv5Zm+EAAAj68P/iidn6jYSNlhLY2640Qg
vPC9xg0lhH/LJLEMMK+oSDnOmF+Hjtm/IMctOVDiTnPfdbvoC9oE4RWnKlL0
/couQQHQKjh2L2mqN50buROjUQyR+pQXGNfVGS+jq74S30299/VnH+gWPUSV
xYRb1i6wuKVGCCNRF3vJHZs1eCiEFKpvC4LUiI5yarclCUE4mCtRO97Iadu/
GTaXn3euy5/5dyZEiPvld5IcGJ0BMC5RJiHb89EpN7A5J+4MvlMNUdcPYgcF
j+ilwsOCpchj1AfjLnosnpCJRysin8aYj9mxGC+gR2/fAIm242qBNrVpnLQM
IjP8G1pKhxKzQx2jFnENvhTKaxDSIWva0u/CSxSiCE3Kepj1b39qsjFlM8k7
0/EzoWf1rxzy0kQQ1qNeoz1Ta93D2cWQkTj6AK6kVmtmt9iaqzjGU+n7w3ae
n+hoYs19r8LnhqSrlAX/N10h7/B++SRJG81EUB4tJF+LtRknFJa1qyr7Guh/
mOieUupr9Ks5WlPYaZ77t61FZauI0bK716p+J5C/f75EdWMrUInVumGletk/
FIaILS6nhq+D6SvrqiVseKvhjc+6p4HoeNVotceus+yssNmkniey5j3Hs0H5
EPmmkAT+hNN5R0wcbj2LaErG3VQ6SGMdY/suIJQb1Aq08nymtVaA2mS8Tcnm
Z+O+
=pqon
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pubkey.asc
URL: <http://dovecot.org/pipermail/dovecot/attachments/20140102/5a94bb27/attachment.asc>


More information about the dovecot mailing list