从 mdbox 迁移 Dovecot 邮件

从 mdbox 迁移 Dovecot 邮件

我正在尝试将 mdbox 迁移到 maildirhttps://wiki.dovecot.org/Migration/MailFormat

我已经修改了 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]

复制过来[电子邮件保护]邮箱从源位置到目标位置。由于这是有效的,我尝试运行

/mnt/testmail/bin/dsync -Dv -u [email protected] mirror maildir:/tmp/destination/mailboxes/[email protected]

但出现了错误:

同步([电子邮件保护]): 调试:命名空间收件箱:type=private、prefix=、sep=、inbox=yes、hidden=no、list=yes、subscriptions=yes location=maildir:/mnt/testmail/mailboxes dsync([电子邮件保护]): 错误:用户初始化失败:命名空间“”:未知的邮件存储驱动程序 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
}

很有可能这是定制编译。

答案1

我发现我需要重新编译 Dovecot

--with-storages=mdbox,imapc,sdbox,maildir,mbox

进行配置以缺少邮件存储格式

相关内容