[Dovecot] Dovecot Maildir ownership/permission problem
Hi,
I have successfully configured Dovecot+Postfix+SSL/TSL and it seems that everything is working except that I have a permission problem with the items under Maildir.
When a mail is first delivered into a user, Postfix automatically creates the Maildir using the user's account and group. It is readable only by the user. This seems to be the correct setting for me, as only the user could read his/her own mails.
However, Dovecot gave an error saying the Maildir is inaccessible and shows that is a permission problem. I changed the chmod to 777 and Dovecot worked (temporarily solution). And, it created additional items under that folder under a "mailman" user (which I specified in the configuration using mail_uid and mail_gid) - Note: it does not work if I do not set these "mail_uid" and "mail_gid" settings.
I think what I would like is to make Dovecot access each individual's mailbox using the user's own account and group. How do I do this? I am using Passwd-file scheme.
--- My dovecot.conf:
mail_uid = vmail mail_gid = vmail listen = 192.168.1.2 protocols = imap pop3 ssl = yes ssl_cert =
--- Some entries on my passwd-file would be:
username:{CRAM-MD5}efaa8bbe8fb0d28a55f7595c3420791990f25cc536f0e23c46cb392cb2b058e2:1001:1001::/home/username:: peter:{CRAM-MD5}512b3e383d95a191d9481e1914cc4caad70cd57029706ec5c3db8ef3039ef405:2001:2001::/home/peter::
Any advice is greatly appreciated. Thanks!
Kevin.
View this message in context: http://old.nabble.com/Dovecot-Maildir-ownership-permission-problem-tp3157336... Sent from the Dovecot mailing list archive at Nabble.com.
On Mon, 2011-05-09 at 07:16 -0700, ikevinjp wrote:
I think what I would like is to make Dovecot access each individual's mailbox using the user's own account and group. How do I do this? I am using Passwd-file scheme. .. --- Some entries on my passwd-file would be:
username:{CRAM-MD5}efaa8bbe8fb0d28a55f7595c3420791990f25cc536f0e23c46cb392cb2b058e2:1001:1001::/home/username:: peter:{CRAM-MD5}512b3e383d95a191d9481e1914cc4caad70cd57029706ec5c3db8ef3039ef405:2001:2001::/home/peter::
Looks like you're almost there since you have uid/gid also specified in the file. So the only thing you need to add is:
userdb { driver = passwd-file args = username_format=%n /usr/local/etc/dovecot/dovecot.users }
participants (2)
-
ikevinjp
-
Timo Sirainen