bestlong 怕失憶論壇's Archiver

bestlong 發表於 2010-10-15 09:52

Dovecot 錯誤 mail_location not set and autodetection failed

用重建的方式升級 Linux 系統後,結果 WebMail 的 IMAP 有問題,檢查 /var/log/maillog 內發現下列訊息:

[quote]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[/quote]

設定方式都是延用舊環境下的參數,結果來到 Fedora 13 就丟出這個新課題。從訊息字面上的意思去找了 /etc/dovecot.conf 內有這麼一大段註解說明:[code]
##
## 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 =
[/code]原來 mail_location 真的沒設定, 看了 examples 就將[code]#mail_location = [/code]改成[code]mail_location = mbox:~/mail:INBOX=/var/mail/%u[/code]然後重新啟動 dovecot 服務後問題就解決了。
頁: [1]

Powered by Discuz! X1.5 Archiver   © 2001-2010 Comsenz Inc.