The command you are looking for is doveadm import

---
Aki Tuomi
Dovecot oy

-------- Original message --------
From: Carsten Schmitz <carsten.schmitz@limesurvey.org>
Date: 23/04/2018 15:46 (GMT+02:00)
To: dovecot@dovecot.org
Subject: Merging mailboxes with doveadm

Hello,

I am trying to merge(=copy) all mails of all user mailboxes into one mailbox for one-time archival purposes.

The command I am using is

 sudo doveadm -v copy -A archive@somedomain.net ALL


The error I get for every mailbox is:

doveadm(someuser1@somedomain.net): Error: Can't open mailbox 'a@somedomain.net': Mailbox doesn't exist: archive@somedomain.net

doveadm(someuser2@somedomain.net): Error: Can't open mailbox 'a@somedomain.net': Mailbox doesn't exist: archive@somedomain.net

[etc...]

I don't exactly understand why. I think I am don't understand the 'destination' parameter correctly, so somebody can enlighten me, please?

Thank you


Carsten