Using dsync for a single mailbox?
Is it possble to use doveadm sync
to migrate a single mailbox? I'm
migrating accounts from another IMAP server,and most of the mailboxes
are in mbox or maildir format, but a few are in MBX. As far as I can tell
the only recommended way to "convert" an MBX mailbox is to sync it via
imap. But dsync fails in inscrutable ways, and the documentation is kind
of scant on how to control what it does.
Even just an example command line showing how to copy remote mailbox FOO into dovecot mailbox BAR would be extremely helpful.
On 21 Jan 2020, at 2.02, Wim Lewis wiml@hhhh.org wrote:
Is it possble to use
doveadm sync
to migrate a single mailbox? I'm migrating accounts from another IMAP server,and most of the mailboxes are in mbox or maildir format, but a few are in MBX. As far as I can tell the only recommended way to "convert" an MBX mailbox is to sync it via imap. But dsync fails in inscrutable ways, and the documentation is kind of scant on how to control what it does.Even just an example command line showing how to copy remote mailbox FOO into dovecot mailbox BAR would be extremely helpful.
Hi,
how does dsync fail? How have you tried? Something like this on the new server:
doveadm -o imapc_server=remote_ip -o imapc_port=remote_port -o imapc_user=
Sami
On Tue, 21 Jan 2020, Sami Ketola wrote:
how does dsync fail? How have you tried? Something like this on the new server:
doveadm -o imapc_server=remote_ip -o imapc_port=remote_port -o imapc_user=
-o imapc_password= backup -u -R imapc:
The best I can do is get it to complete without any errors but without transferrig any mail. I've added the imapc config to local.conf, and I run it like this:
doveadm -Dv sync -1 -R -u local_user -m mailbox_name imapc:
(or variations on that, e.g. with -n namespace). It successfully logs in to the remote imapd, but doesn't decide to transfer anything. If I leave off the "-m mailbox_name" it does start traversing the remote maibox hierarchy, but I really don't want it to transfer everything --- just some specific mailboxes.
One thing that's unclear to me is exactly what strings I should pass to the -n and -m flags. Do I specify a namespace by its local prefix, or its remote prefix, or its name in the config file, or ... ? And mailbox names? How does dsync map remote to local names?
On 22 Jan 2020, at 8.37, Wim Lewis wiml@hhhh.org wrote:
On Tue, 21 Jan 2020, Sami Ketola wrote:
how does dsync fail? How have you tried? Something like this on the new server:
doveadm -o imapc_server=remote_ip -o imapc_port=remote_port -o imapc_user=
-o imapc_password= backup -u -R imapc: The best I can do is get it to complete without any errors but without transferrig any mail. I've added the imapc config to local.conf, and I run it like this:
doveadm -Dv sync -1 -R -u local_user -m mailbox_name imapc:
(or variations on that, e.g. with -n namespace). It successfully logs in to the remote imapd, but doesn't decide to transfer anything. If I leave off the "-m mailbox_name" it does start traversing the remote maibox hierarchy, but I really don't want it to transfer everything --- just some specific mailboxes.
One thing that's unclear to me is exactly what strings I should pass to the -n and -m flags. Do I specify a namespace by its local prefix, or its remote prefix, or its name in the config file, or ... ? And mailbox names? How does dsync map remote to local names?
Hi,
can you then add "-o imapc_rawlog_dir=/desti/nation/" where doveadm process can write rawlogs for the transfer. That probably reveals what goes wrong in the session.
Sami
On Wed, 22 Jan 2020, Sami Ketola wrote:
On 22 Jan 2020, at 8.37, Wim Lewis wiml@hhhh.org wrote:
(or variations on that, e.g. with -n namespace). It successfully logs in to the remote imapd, but doesn't decide to transfer anything. If I leave off the "-m mailbox_name" it does start traversing the remote maibox hierarchy, but I really don't want it to transfer everything --- just some specific mailboxes.
One thing that's unclear to me is exactly what strings I should pass to the -n and -m flags. Do I specify a namespace by its local prefix, or its remote prefix, or its name in the config file, or ... ? And mailbox names? How does dsync map remote to local names?
Hi,
can you then add "-o imapc_rawlog_dir=/desti/nation/" where doveadm process can write rawlogs for the transfer. That probably reveals what goes wrong in the session.
The IMAP traffic looks about like I'd expect --- the mailbox in question shows up in both the LIST and LSUB responses, and doveadm-sync doesn't issue any more commands after those before LOGOUT.
/tmp/rawlogs/20200122-211154.743.1.in: 1579756317.291315 * LIST (\NoInferiors \UnMarked) "/" mailbox_name 1579756317.292634 * LSUB () "/" mailbox_name
participants (2)
-
Sami Ketola
-
Wim Lewis