I have set up dovecot as suggested here.

Mail is delivered to the correct directory and I set my mail_location as suggested: Dovecot -n yeilds this:

disable_plaintext_auth = no
mail_location = mbox:~/:INBOX=/var/spool/mail/%u
mbox_write_locks = fcntl
passdb {
  driver = pam
protocols = pop3
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
  driver = passwd

Permissions on /var/spool/mail are:

-rw-rw----   1 dougw      mail       20787737 May 23 20:01 dougw

and on the spool/mail directory itself:

drwxrwxr-x.  3 root   mail   4096 May 23 20:05 mail

and permissions on my home directory .imap are:

drwxrwx---    2 dougw mail        4096 May 23 20:08 .imap

Yet if I tail maillog (tail -f maillog | grep dougw)

I get this...

May 23 19:55:57 pnweb-01 dovecot: pop3-login: Login: user=<dougw>, method=PLAIN, rip=, lip=, mpid=4981
May 23 19:55:57 pnweb-01 dovecot: pop3(dougw): Error: chown(/home/dougw/.imap/INBOX, -1, 12(mail)) failed: Operation not permitted (egid=500(dougw), group based on /var/spool/mail/dougw)
May 23 19:55:57 pnweb-01 dovecot: pop3(dougw): Error: mkdir(/home/dougw/.imap/INBOX) failed: Operation not permitted
May 23 19:55:57 pnweb-01 dovecot: pop3(dougw): Error: Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2014-05-23 19:55:57]
May 23 19:55:57 pnweb-01 dovecot: pop3(dougw): Couldn't open INBOX top=0/0, retr=0/0, del=0/0, size=0

If I have mail_location set, what is it trying to do in my home directory anyway? What am I missing?

Thanks in advance...

  • You have set your mbox location to be ~ (your home) and your INBOX location to be /var/spool/mail/dougw and that is why. – clement May 24 '14 at 5:51
  • Is messages delivered by sendmail or you have used dovecot-lda as delivery agent? – Kondybas May 25 '14 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.