Score:0

Can I move files between mailboxes using dovecot?

pk flag

I'm using Dovecot with Maildirs. I want to move a whole bunch of messages between mailboxes. Like, hundreds of thousands of messages. Should I just use my mail client? Should I move the message files manually on the server? Is there another way to get this done without damaging Dovecot's indexes?

Score:2
pk flag

Based on my understanding of Dovecot, moving files between Maildir directories is likely to be "okay"; Dovecot should be able to rebuild indices as it goes. HOWEVER, there's a much much better way to do it: use the doveadm copy command. Here's an example I just used:

doveadm move Deleted-Messages-2019 mailbox "Deleted Messages" BEFORE 2019-12-31

This moved about 50K messages in about 10 seconds, and presumably did it in a way that allows dovecot to gracefully reindex.

John Clements avatar
pk flag
Many thanks to @jens_erat for pointing me toward `doveadm` !
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.