I am using Maildir and virtual domains. I have the following definitions in the dovecot.conf: mail_uid = 10000 mail_gid = 10000 mail_location = maildir:/var/mail/apps/%d/%n/Maildir ... Userdb database is LDAP based. Some users in LDAP might have a uid/gid defined. If thats the case, I want dovecot to use those uid/gid. If the user in LDAP does not have a uid/gid attribute, it'll fall back to using mail_uid/mail_gid as defined above. (atleast thats what I am hoping to do...) I set the permissions of /var/mail/apps, /var/mail/apps/%d directories 1777. I also see the following error message when a message is received to one of the users: Jan 13 18:33:33 vds5 deliver(admin at domain.com): [ID 702911 mail.error] stat(/var/mail/apps/domain.com/admin/Maildir/tmp) failed: Permission denied The permissions of this tmp directory are: drwx------ 2 vmail vmail 2 Jan 13 18:31 tmp Why is deliver having problems writing to that? At this point, what uid is deliver running as? Thanks!
On Sunday 13 January 2008 21:37:27 Anil wrote:> I am using Maildir and virtual domains. > > I have the following definitions in the dovecot.conf: > mail_uid = 10000 > mail_gid = 10000 > mail_location = maildir:/var/mail/apps/%d/%n/Maildir > ... > > Userdb database is LDAP based. Some users in LDAP might have a uid/gidWe do the same thing but we use user_global_uid and user_global_gid defined in the dovecot-ldap.conf file... it is not clear if you are using a PAM/LDAP or direct LDAP configuration but the options I mention are defined in this wiki page: http://wiki.dovecot.org/AuthDatabase/LDAP
On Sun, 2008-01-13 at 18:37 -0800, Anil wrote:> I am using Maildir and virtual domains. > > I have the following definitions in the dovecot.conf: > mail_uid = 10000 > mail_gid = 10000 > mail_location = maildir:/var/mail/apps/%d/%n/Maildir > .....> I set the permissions of /var/mail/apps, /var/mail/apps/%d directories 1777...> I also see the following error message when a message is received to > one of the users: > Jan 13 18:33:33 vds5 deliver(admin at domain.com): [ID 702911 mail.error] > stat(/var/mail/apps/domain.com/admin/Maildir/tmp) failed: Permission > denied > > > The permissions of this tmp directory are: > drwx------ 2 vmail vmail 2 Jan 13 18:31 tmpAssuming vmail is 10000 it looks ok.> Why is deliver having problems writing to that? At this point, what > uid is deliver running as?10000. Since this has been such a common problem, I finally added some code to make it clearly log what uid/gid it's running as and what directory has the permission problem: http://hg.dovecot.org/dovecot/rev/93fe72ef59f6 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080120/d1443089/attachment-0002.bin>