[Dovecot] Maildir owner importance

Roi Efrati roi.efrati at gmail.com
Tue Dec 28 11:10:18 EET 2004


OK, I'v set all the directory tree from the main maildir
(/var/local/virtualdir/) to the virtualmail user using chmod -R
virtualmail.virtualmail /var/local/virtualdir

And correct me if I'm wrong,
The auth_user is still "auth_user = root" and I need to have the
"default_mail_env"
set as default_mail_env = maildir:/var/local/virtualdir/%d/%n .
But I also need to set:
first_valid_uid = 100                                        
last_valid_uid = 100                                         
first_valid_gid = 101                                        
last_valid_gid = 101
which are the uid and gid for the user virtualmail



On Mon, 27 Dec 2004 13:12:50 -0500, Peter Lacey
<placey at wanderingbarque.com> wrote:
> > How important is to have all the directory tree owned by the same user
> > group (virtualmail:virtualmail) ?
> 
> My understanding (which could be wrong) is that it's pretty important.
> First, as a rule of thumb, nothing should be owned by root that doesn't
> have to be owned by root.  When Dovecot is writing mail to a directory,
> it assumes the user ID of the recipient.  In your virtual setup you
> probably don't have local users, so Dovecot will change to the user id
> returned from your database/ldap query, or, if using LDAP and you want
> to, to the user specified in user_global_uid setting.  In either case,
> that user should be the user who owns the directory tree (virtualmail)
> and not root.  Your setup can work, of course, if you give the
> directory read/write permissions for group and world, but why would you
> want to?
> 
> - Pete
> 
>



More information about the dovecot mailing list