1

I want to transfer an email from user1@domain.com to put it in a folder of another user: user2@domain.com

For that, it seems to me appropriate to use 'doveadm move' command, but I can not get the right result. Can you help me?

syntax: doveadm move [-u |-A] [-S ] [user ]

my attempts:

doveadm move -u user2@domain.com DIRECTORY_2 mailbox user1@domain.com:'DIRECTORY_1' all

return: Error: Syncing mailbox user1@domaine.fr:DOSSIER_1 failed: Mailbox doesn't exist: user1@domaine.fr:DOSSIER_1

doveadm -u user2@domain.com DIRECTORY_2 mailbox sdbox:/complete/path/user1@domain.com/mailboxes/DIRECTORY_1 all

return: Error: Syncing mailbox sdbox:/complete/path/user1@domain.com/mailboxes/DIRECTORY_1 failed: Mailbox doesn't exist: sdbox:/complete/path/user1@domain.com/mailboxes/DIRECTORY_1

doveadm move -u user2@domain.com DIRECTORY_2 mailbox user1@domain.com 'DIRECTORY_2' all

return: Fatal: Unknown argument DIRECTORY_2

some details:

  • directory exists
  • the following command works (in case 'DIRECTORY_1' and 'DIRECTORY_2' are in the user1@domain.com user): doveadm move -u user1@domain.com DIRECTORY_2 mailbox 'DIRECTORY_1' ALL

  • my problem is that I can not put another user destination

vincent
  • 21
  • 1
  • 5

2 Answers2

1

doveadm [-Dv] move [-S socket_path] -u user destination search_query

You need 3 things.

  1. The destination folder has to exist, does it? It should usually be under the same directory.
  2. ALL needs to be all caps.
  3. Is DIRECTORY_2 the destination, or the second path?

Assuming DIRECTORY_2 is the place where you want to put it (and it exists):

doveadm move -u user2@domain.com DIRECTORY_2 ALL

NickW
  • 10,263
  • 1
  • 20
  • 27
1

here is the solution:

doveadm move -u user2@domain.com DIRECTORY_2 user user1@domain.com mailbox DIRECTORY_1 ALL

thanks

vincent
  • 21
  • 1
  • 5