Migration from mbox/maildir++ to mdbox

Nima Saed-Samii nima at ikp.uni-koeln.de
Mon Jul 28 19:08:43 UTC 2014


Dear list,

dovecot version: 2.1.7

I have an old mail server that uses mboxes for the INBOX and
maildirs for subfolders. I want to migrate our mail handling
to a new setup using mdboxes for everything.

The current config looks like this:

# 2.1.7: /etc/dovecot/dovecot.conf
doveconf: Warning: service anvil { client_limit=1000 } is lower than
required under max. load (1127)
# OS: Linux 3.2.0-0.bpo.4-686-pae i686 Debian 6.0.10 
auth_mechanisms = plain login
disable_plaintext_auth = no
first_valid_uid = 114
log_path = /var/log/dovecot.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = mbox:~/Mail/MBox:INBOX=/var/mail/%u
mail_max_userip_connections = 30
mail_privileged_group = mail
namespace {
  hidden = yes
  inbox = yes
  list = no
  location = 
  prefix = "#mbox/"
  separator = /
}
namespace {
  location = maildir:~/Mail/Maildir
  prefix = 
  separator = /
}
passdb {
  args = dovecot
  driver = pam
}
protocols = imap
service auth {
  client_limit = 1024
  user = root
}
service imap-login {
  inet_listener imap {
    port = 0
  }
  process_limit = 1024
}
ssl_cert = </etc/ssl/certs/cert-imap.ikp.pem
ssl_key = </etc/ssl/private/key-imap.ikp.pem
ssl_key_password = *********
userdb {
  driver = passwd
}

I would like to use dsync to migrate all to mdboxes and transfer them
to the new system. Unfortunately I can't get dsync to do that. Using
a config that specifies only one namespace allows me to convert either
mboxes or Maildirs to mdboxes but not both. Using the above config
dsync somehow thinks the source and destination are the same:

Syncing mailbox for user nima (136 MB)
Setup done.
doveadm(root): Debug: Loading modules from directory: /usr/lib/dovecot/modules
doveadm(root): Debug: Module loaded: /usr/lib/dovecot/modules/lib20_zlib_plugin.so
doveadm(root): Debug: Loading modules from directory: /usr/lib/dovecot/modules/doveadm
doveadm(root): Debug: Module loaded: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_zlib_plugin.so
doveadm(nima): Debug: Effective uid=5224, gid=1162, home=/home/nima
doveadm(nima): Debug: Namespace mboxes: type=private, prefix=#mbox/, sep=/, inbox=yes, hidden=no, \
                      list=yes, subscriptions=yes location=mbox:~/Mail/MBox:INBOX=/var/mail/nima
doveadm(nima): Debug: fs: root=/home/nima/Mail/MBox, index=, control=, inbox=/var/mail/nima, alt=
doveadm(nima): Debug: Namespace maildirs: type=private, prefix=, sep=/, inbox=no, hidden=no, list=yes, \
                      subscriptions=yes location=maildir:~/Mail/Maildir
doveadm(nima): Debug: maildir++: root=/home/nima/Mail/Maildir, index=, control=, inbox=, alt=
dsync(nima): Debug: Effective uid=5224, gid=1162, home=/home/nima
dsync(nima): Debug: Namespace mboxes: type=private, prefix=#mbox/, sep=/, inbox=yes, hidden=no, list=yes, \
                    subscriptions=yes location=mdbox:/scratch/mail-convert/nima
dsync(nima): Debug: fs: root=/scratch/mail-convert/nima, index=, control=, inbox=, alt=
dsync(nima): Debug: Namespace #mbox/: Using permissions from /scratch/mail-convert/nima: mode=0700 gid=-1
dsync(nima): Debug: Namespace maildirs: type=private, prefix=, sep=/, inbox=no, hidden=no, list=yes, \
                    subscriptions=yes location=maildir:~/Mail/Maildir
dsync(nima): Debug: maildir++: root=/home/nima/Mail/Maildir, index=, control=, inbox=, alt=
dsync(nima): Fatal: Both source and destination mail_location points to same directory: /home/nima/Mail/Maildir

What am I doing wrong?

Best regards,
Nima Saed-Samii
-- 
Institute for Nuclear Physics, University of Cologne
Zuelpicher Str. 77
50937 Cologne
Germany
Tel.: +49-221-470-3617
Fax.: +49-221-470-5168


-- 
Institute for Nuclear Physics, University of Cologne
Zuelpicher Str. 77
50937 Cologne
Germany
Tel.: +49-221-470-3617
Fax.: +49-221-470-5168




More information about the dovecot mailing list