[Dovecot] dovecot Maildir issue

Mark E. Mallett mem at mv.mv.com
Wed Jan 26 19:10:19 EET 2005


On Tue, Jan 25, 2005 at 10:53:49PM -0500, Tadghe Danu wrote:
> I'm working on switching a domain from a Cyrus+postfix+procmail to
> Dovecot+postfix+procmail (using Maildir).  It works great, except one
> small problem.
> I cannot figure out what the permissions for my Maildir directories
> should be.  Can anyone point me to a doc or just a few pointers on
> what the permissions of the Maildirs should be? The only way I seem to
> be able to make this config work is to make the Maildirs world
> read+write. I can't exactly roll out a config like that :).
> 
> I have postfix+procmail delivering to per user Maildirs under /var/mail. 
> The permissions on /var/mail (pulled from the Wiki) are 
> 
> mail:/var/mail# ls -l /var/ |grep mail
> drwxrwxrwt   7 root     mail      4096 Jan 25 22:37 mail
> 
> The user Maildirs are set as:
> mail:/var/mail# ls -l /var/mail/ |grep tadghe

or    ls -ld /var/mail/tadghe


> drwxr-xrwt  2 tadghe   tadghe 4096 Jan 25 22:36 tadghe

that's certainly odd looking :-)
it should be sufficient to have the maildir owned by the user if
procmail is running as that user (as it appears to be).


> When I try and access a mail box I get this in the logs
> 
> an 25 22:35:34 mail imap(tadghe): opendir(/var/mail/tadghe/tmp)
> failed: Permission denied
> Jan 25 22:35:34 mail imap(tadghe): opendir() failed with file
> /var/mail/tadghe/new: Permission denied
> Jan 25 22:35:34 mail imap(tadghe): opendir() failed with file
> /var/mail/tadghe/new: Permission denied
> Jan 25 22:35:34 mail imap(tadghe): opendir(/var/mail/tadghe/tmp)
> failed: Permission denied

Did you create the {tmp,cur,new} subdirectories?  And are they
owned by the user?  e.g. what is the output of:

   ls -l /var/mail/tadghe

You should see the three subdirectories all owned by the user.

Another possibility is that the user doesn't have access to the entire
path, e.g. that /var or the underlying mount point (if it's a separate
filesystem) is restricted.

mm


More information about the dovecot mailing list