0

I’m trying to migrate mdbox to maildir based on https://wiki.dovecot.org/Migration/MailFormat

I have modified dovecot.conf and set mail_location=maildir:/tmp/destination/mailboxes/

Then I had run

/mnt/testmail/bin/dsync -Dv -u user@domain.com mirror mdbox:/source/mailboxes/user@domain.com

but that did nothing. Then I have modified dovecot.conf and set mail_location=mdbox:/source/mailboxes

Then I had run

/mnt/testmail/bin/dsync -Dv -u user@domain.com mirror mdbox:/tmp/destination/mailboxes/user@domain.com

that copied over user@domain.com mailbox from the source to the destination location. As that was working I have tried to run

/mnt/testmail/bin/dsync -Dv -u user@domain.com mirror maildir:/tmp/destination/mailboxes/user@domain.com

but that got an error:

dsync(user@domain.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/mnt/testmail/mailboxes dsync(user@domain.com): Error: User initialization failed: Namespace '': Unknown mail storage driver maildir

First problem is that, based on example #2 from above, provided syntax in https://wiki.dovecot.org/Migration/MailFormat is incorrect or for some reason is not working for me as it should for example #1.

Second issue is not recognizing maildir format – what about that? Docecot has some missing libraries?

Dovecot version 2.2.18 and config looks like:

# 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 = postmaster@test2.domain.com
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
}

Highly possible it was custom compilation.

JackTheKnife
  • 371
  • 1
  • 6
  • 24

1 Answers1

0

I came up that I need to recompile Dovecot with

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

make configuration to have missing mail storage format

JackTheKnife
  • 371
  • 1
  • 6
  • 24