我正在尝试基于https://wiki.dovecot.org/Migration/MailFormat将 mdbox 迁移到 maildir
我修改了 dovecot.conf 并设置mail_location=maildir:/tmp/destination/mailboxes/
然后我跑了
/mnt/testmail/bin/dsync -Dv -u [email protected] mirror mdbox:/source/mailboxes/[email protected]
但这什么也没做。然后我修改了 dovecot.conf 并设置mail_location=mdbox:/source/mailboxes
然后我跑了
/mnt/testmail/bin/dsync -Dv -u [email protected] mirror mdbox:/tmp/destination/mailboxes/[email protected]
通过 [email protected] 邮箱从源复制到目标位置。由于那是有效的,我试图运行
/mnt/testmail/bin/dsync -Dv -u [email protected] mirror maildir:/tmp/destination/mailboxes/[email protected]
但这有一个错误:
dsync([email protected]): 调试: 命名空间收件箱: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/mnt/testmail/mailboxes dsync ([email protected]):错误:用户初始化失败:命名空间'':未知的邮件存储驱动程序 maildir
第一个问题是,根据上面的示例 #2,https ://wiki.dovecot.org/Migration/MailFormat 中提供的语法不正确,或者由于某种原因对我不起作用,例如 #1。
第二个问题是无法识别 maildir 格式——那又如何呢?Docecot 有一些缺失的库吗?
Dovecot 版本 2.2.18 和配置如下:
# 2.2.18: /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.8
# OS: Linux 2.6.32-754.14.2.el6.x86_64 x86_64 CentOS release 6.10 (Final) xfs
auth_master_user_separator = *
auth_mechanisms = plain login
dict {
acl = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
lda_mailbox_autosubscribe = yes
log_path = /var/log/dovecot.log
mail_home = mdbox:/var/homedirs/%2Mu/%2.2Mu/%u
mail_location = mdbox:/var/mailboxes/%2Mu/%2.2Mu/%u
mail_plugins = acl
mail_shared_explicit_inbox = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate vnd.dovecot.pipe vnd.dovecot.filter vnd.dovecot.execute
namespace {
list = children
location = mdbox:/var/mailboxes/%%2Mu/%%2.2Mu/%%u
prefix = shared/%%u/
separator = /
subscriptions = yes
type = shared
}
namespace inbox {
inbox = yes
location =
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox INBOX {
auto = subscribe
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
prefix =
subscriptions = yes
}
passdb {
args = /etc/dovecot/mastership-sql.conf
driver = sql
master = yes
pass = yes
}
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
acl = vfile
acl_defaults_from_inbox = yes
acl_shared_dict = proxy::acl
sieve_after = /etc/dovecot/sieve/99-file-qvera-ccda.sieve
sieve_after2 = /etc/dovecot/sieve/98-notify-biz-address.sieve
sieve_after3 = /etc/dovecot/sieve/97-mdn-processed.sieve
sieve_execute_bin_dir = /etc/dovecot/sieve-execute
sieve_execute_socket_dir = sieve-execute
sieve_extensions = +vnd.dovecot.execute +vnd.dovecot.filter +vnd.dovecot.pipe
sieve_filter_bin_dir = /etc/dovecot/sieve-filter
sieve_filter_socket_dir = sieve-filter
sieve_pipe_bin_dir = /etc/dovecot/sieve-pipe
sieve_pipe_socket_dir = sieve-pipe
sieve_plugins = sieve_extprograms
}
postmaster_address = [email protected]
sendmail_path = /sbin/sendmail
service dict {
unix_listener dict {
user = dovecot
}
}
service imap-postlogin {
executable = script-login /etc/dovecot/imappostlogin
user = $default_internal_user
}
service imap {
executable = imap imap-postlogin
}
ssl = no
userdb {
args = uid=dovecot gid=dovecot home=/var/mailboxes/%%2Mu/%%2.2Mu/%%u
driver = static
}
protocol lmtp {
mail_plugins = acl sieve
}
protocol lda {
mail_plugins = acl sieve
}
protocol imap {
mail_plugins = acl imap_acl
}
很有可能是自定义编译。
我想我需要重新编译 Dovecot
--with-storages=mdbox,imapc,sdbox,maildir,mbox
使配置缺少邮件存储格式