- 註冊時間
- 2006-3-13
- 最後登錄
- 2025-1-10
- 在線時間
- 673 小時
- 閱讀權限
- 200
- 積分
- 417
- 帖子
- 1107
- 精華
- 0
- UID
- 2
  
|
用重建的方式升級 Linux 系統後,結果 WebMail 的 IMAP 有問題,檢查 /var/log/maillog 內發現下列訊息:
dovecot: IMAP(bestlong): mail_location not set and autodetection failed: Mail storage autodetection failed with home=/home/bestlong
dovecot: IMAP(bestlong): Fatal: Namespace initialization failed
設定方式都是延用舊環境下的參數,結果來到 Fedora 13 就丟出這個新課題。從訊息字面上的意思去找了 /etc/dovecot.conf 內有這麼一大段註解說明:- ##
- ## Mailbox locations and namespaces
- ##
- # Location for users' mailboxes. This is the same as the old default_mail_env
- # setting. The default is empty, which means that Dovecot tries to find the
- # mailboxes automatically. This won't work if the user doesn't have any mail
- # yet, so you should explicitly tell Dovecot the full location.
- #
- # If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
- # isn't enough. You'll also need to tell Dovecot where the other mailboxes are
- # kept. This is called the "root mail directory", and it must be the first
- # path given in the mail_location setting.
- #
- # There are a few special variables you can use, eg.:
- #
- # %u - username
- # %n - user part in user@domain, same as %u if there's no domain
- # %d - domain part in user@domain, empty if there's no domain
- # %h - home directory
- #
- # See <doc/wiki/Variables.txt> for full list. Some examples:
- #
- # mail_location = maildir:~/Maildir
- # mail_location = mbox:~/mail:INBOX=/var/mail/%u
- # mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
- #
- # <doc/wiki/MailLocation.txt>
- #
- #mail_location =
複製代碼 原來 mail_location 真的沒設定, 看了 examples 就將改成- mail_location = mbox:~/mail:INBOX=/var/mail/%u
複製代碼 然後重新啟動 dovecot 服務後問題就解決了。 |
|