Mail migration problem

Germán Herrera g.herrera at ses.com.ar
Mon Jun 24 17:53:22 EEST 2019


I see, it seems it wasn't compiled with maildir storage engine.

About running another dovecot instance on the same box, I never tried it 
myself, but I guess you could have your production version (which needs 
to support maildir, otherwise you won't be able to access the mailboxes 
after the migration) in /usr (as distros usually do), and install your 
customized version (with support for maildir and dbox for the migration) 
in /usr/local.

If you go this way, you will have to reference the dovecot version 
you're addressing with the full path (/usr/bin/doveadm or 
/usr/local/bin/doveadm), or you'll have to rely on your $PATH 
environment variable. You also need to take into account to separate the 
/etc directories for both instances, because you'll probably need 
slightly different configurations.

Cheers

On 2019-06-24 10:34, Adam Raszkiewicz via dovecot wrote:
> Yeah, I think dovecot was a custom compiled build
> 
> Version is 2.2.18
> 
> Config:
> 
> # 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 at 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
> }
> 
> and --build-options:
> 
> Build options: ioloop=epoll notify=inotify ipv6 openssl 
> io_block_size=8192
> Mail storages: shared mdbox raw fail
> SQL drivers: mysql
> Passdb: checkpassword pam passwd passwd-file shadow sql
> Userdb: checkpassword nss passwd prefetch passwd-file sql
> 
> At that point my question is if I can run another dovecot build on the
> same box? I knew I can run the same instance but as is this a custom
> build I want to have something generic just to use for migration
> purposes.
> 
> Thanks,
> Adam
> 
> On 6/21/19, 4:45 PM, "dovecot on behalf of Germán Herrera via
> dovecot" <dovecot-bounces at dovecot.org on behalf of
> dovecot at dovecot.org> wrote:
> 
>     Well, judging by the error message it appears like dovecot hasn't 
> been
>     compiled with support for maildir, which is strange because I don't 
> see
>     any way to disable in the compile-time options.
> 
>     Are you using the precompiled package from the distro or compiling
>     dovecot by yourself? Could you share the output of "dovecot
>     --build-options" and "dovecot --version"?
> 
>     Thanks!
> 
>     On 2019-06-21 17:17, Adam Raszkiewicz wrote:
> 
>     > Hi German,
>     >
>     > I have tried your way and getting the same error message:
>     >
>     > dsync(user at domain.com): Debug: Namespace inbox: type=private, 
> prefix=,
>     > sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes
>     > location=maildir:~/Maildir
>     >
>     > dsync(user at domain.com): Error: User initialization failed: 
> Namespace
>     > '': Unknown mail storage driver maildir
>     >
>     > Thoughts? Missing dovecot library, something in the 
> configuration?
>     >
>     > Thanks,
>     >
>     > Adam
>     >
>     > FROM: dovecot <dovecot-bounces at dovecot.org> on behalf of Germán 
> Herrera
>     > via dovecot <dovecot at dovecot.org>
>     > ORGANIZATION: SES Sistemas Electrónicos S.A.
>     > REPLY-TO: Germán Herrera <g.herrera at ses.com.ar>
>     > DATE: Friday, June 21, 2019 at 3:10 PM
>     > TO: Adam Raszkiewicz <araszkiewicz at medallies.com>
>     > CC: "dovecot at dovecot.org" <dovecot at dovecot.org>
>     > SUBJECT: Re: Mail migration problem
>     >
>     > Hi Adam
>     >
>     > Can you try: "doveadm sync -u <user> maildir:~/Maildir"
>     >
>     > My mailboxes are in sdbox (I have "mail_location =
>     > sdbox:~/sdbox:ALT=/mnt/archive/%u/sdbox") and after running that
>     > command I managed to successfully migrate the user mailbox to 
> maildir.
>     > Also that is the command I used to migrate all my user's maildirs 
> to
>     > sdbox some time ago.
>     >
>     > Regards
>     >
>     > ---
>     >
>     > Germán Herrera
>     > Responsable de IT
>     > Ingeniería
>     > SES Sistemas Electrónicos S.A.| Espinosa 1045 (C1405AMM) | Buenos 
> Aires
>     > | Argentina
>     > W: +54 11 54530000 | Email: g.herrera at ses.com.ar
>     >
>     > -------------------------
>     >
>     > Denos su opinión aquí
>     >
>     > On 2019-06-21 11:58, Adam Raszkiewicz via dovecot wrote:
>     >
>     >> I'm trying to migrate mdbox to maildir based on
>     >> https://wiki.dovecot.org/Migration/MailFormat
>     >>
>     >> * Modified dovecot.conf and set
>     >> mail_location=maildir:/tmp/destination/mailboxes/
>     >> * Then I had run
>     >>
>     >> /mnt/testmail/bin/dsync -Dv -u user at domain.com mirror
>     >> mdbox:/source/mailboxes/user at 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 at domain.com mirror
>     >> mdbox:/tmp/destination/mailboxes/user at domain.com
>     >>
>     >> that copied over user at 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 at domain.com mirror
>     >> maildir:/tmp/destination/mailboxes/user at domain.com
>     >>
>     >> but that got an error:
>     >>
>     >> dsync(user at domain.com): Debug: Namespace inbox: type=private, 
> prefix=,
>     >> sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes
>     >> location=maildir:/mnt/testmail/mailboxes
>     >>
>     >> dsync(user at 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?
>     >>
>     >> Thanks,
>     >>
>     >> Adam


More information about the dovecot mailing list