![Dovecot 2.2.36-8 基本设置 - mbox:mbox 根目录不能是文件](https://linux22.com/image/774775/Dovecot%202.2.36-8%20%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE%20-%20mbox%EF%BC%9Ambox%20%E6%A0%B9%E7%9B%AE%E5%BD%95%E4%B8%8D%E8%83%BD%E6%98%AF%E6%96%87%E4%BB%B6.png)
我正在尝试在我的基本 Centos 7 邮件服务器上设置 IMAP 服务器。我已设置 postfix MTA 并将邮件发送到以下目录(我没有理由将其更改为使用 $HOME 目录):
root@mail3:/var/spool/mail
# ls -ltrh
total 12K
-rw-rw----. 1 rpc mail 0 Feb 29 2020 rpc
-rw-rw----. 1 centos mail 0 Feb 3 19:39 centos
-rw-rw----. 1 bruce mail 0 Feb 3 19:47 bruce
-rw-rw----. 1 navid mail 0 Feb 3 19:47 navid
-rw-rw----. 1 mcchen mail 0 Feb 3 19:47 mcchen
-rw-rw----. 1 rab mail 9.0K Feb 4 16:44 rab
服务器上的mailx表示邮件存储在/var/spool/mail/%n中:
[rab@mail3 ~]$ mailx
Heirloom Mail version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/rab": 5 messages 3 unread
>U 1 robert.mcnaught@gmai Thu Feb 3 20:23 13/521 "Test 2 with telnet"
U 2 robert.mcnaught@gmai Thu Feb 3 20:25 10/453 "Test from edge using telnet"
U 3 robert.mcnaught@gmai Thu Feb 3 21:21 10/451 "Test from Telnet Thursday"
4 Rab McNaught Fri Feb 4 16:32 75/3885 "Test from Gmail"
5 Rab McNaught Fri Feb 4 16:43 75/3902 "Test 3 with local_domains readded"
我在 dovecot.conf 和 10-mail.conf 中设置了以下配置(默认):
# vi dovecot.conf
protocols = imap
login_greeting = Dovecot ready.
listen = *, ::
root@mail3:/etc/dovecot/conf.d
# vi 10-mail.conf
mail_location = maildir:/var/spool/mail/
我还在 /var/spool/mail 和邮箱文件上添加了全局写权限,因为随后我遇到了与权限相关的错误。
我现在发现我可以通过 IMAP 和 SELECT INBOX 登录,但它会产生一个空邮箱,这表明它没有在 /var/spool/mail/rab 中获取我的邮箱文件
# telnet 0 143
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN] Dovecot ready.
. login rab 1314scoTM
. OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY SPECIAL-USE] Logged in
. select inbox
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1643997561] UIDs valid
* OK [UIDNEXT 1] Predicted next UID
. OK [READ-WRITE] Select completed (0.004 + 0.000 + 0.003 secs).
有人能给我指出正确的方向吗?