Sendmail 和 Dovecot 几乎可以正常工作但还不够

Sendmail 和 Dovecot 几乎可以正常工作但还不够

我已经按照建议设置了 dovecot这里。

邮件被传递到正确的目录,并且我按照建议设置了我的 mail_location:Dovecot -n 产生如下结果:

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
}

/var/spool/mail 的权限为:

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

以及在 spool/mail 目录本身上:

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

我的主目录 .imap 的权限是:

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

但是如果我跟踪邮件日志(tail -f maillog | grep dougw)

我明白了...

May 23 19:55:57 pnweb-01 dovecot: pop3-login: Login: user=<dougw>, method=PLAIN, rip=98.164.246.59, lip=10.10.1.63, 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

如果我设置了 mail_location,它到底想在我的主目录中做什么?我遗漏了什么?

提前致谢...

相关内容