[Dovecot] Permissions errors while reading messages via IMAP

Geoff Sweet geoff.sweet at wemadeusa.com
Wed Dec 23 23:13:16 EET 2009


Delivery doesn't seem to be the issue.  The issue appears to be reading the mail later on.

Here is my master.cf line for dovecot:
dovecot   unix  -       n       n       -       -       pipe
    flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -d ${recipient}

and as you can see, the files in the delivery location have the correct permissions for being delivered by user "vmail":
# ls -la
total 64
drwx------ 5 vmail vmail 4096 Dec 23 12:11 .
drwx------ 3 vmail vmail 4096 Dec 21 17:41 ..
drwx------ 2 vmail vmail 4096 Dec 21 17:41 cur
-rw------- 1 vmail vmail  224 Dec 22 00:01 dovecot.index
-rw------- 1 vmail vmail  572 Dec 23 11:51 dovecot.index.log
-rw------- 1 vmail vmail  472 Dec 23 11:51 dovecot-uidlist
drwx------ 2 vmail vmail 4096 Dec 23 11:51 new
drwx------ 2 vmail vmail 4096 Dec 23 11:51 tmp

The errors appear when I login via IMAP and try to read the messages.  

-Geoff



________________________________________
From: Timo Sirainen [tss at iki.fi]
Sent: Wednesday, December 23, 2009 1:03 PM
To: Geoff Sweet
Cc: dovecot at dovecot.org
Subject: Re: [Dovecot] Permissions errors while reading messages via IMAP

On Wed, 2009-12-23 at 12:18 -0800, Geoff Sweet wrote:
> Dec 23 12:08:49 mail1 dovecot: IMAP(geoff.sweet at test.com): open(/home/vmail/test.com/geoff.sweet/Maildir/dovecot.index.log) failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +r perm: /home/vmail/test.com/geoff.sweet/Maildir/dovecot.index.log)
..
> There is some permission issue that allows dovecot to deliver email to the /home/vmail location (I dislike this location and want to change it) via the dovecot LDA process, but then not be able to read it when accessed via IMAP.  I'm very confused lol.

Apparently you want the emails to be owned by vmail:vmail, but you're
running deliver as something else than vmail and the resulting files
won't be owned by vmail:vmail..

So you're calling deliver wrong from Postfix. Your master.cf probably
has dovecot pipe, it should have user=vmail:vmail.



More information about the dovecot mailing list