0

I'm migrating a mailbox setup for a small office where all people are storing company emails in their own personal mailbox to a public mailbox that everyone can access. I started out with doveadm-copy, but now have to move to doveadm-move because of storage constraints.

The manpage states that the difference between *-copy and *-move is that after a successful MOVE, an EXPUNGE is performed, and I can confirm that the emails from the source mailbox are gone and have been placed in the destination mailbox. But... the disk usage only increases, whereas I would expect it to stay flat.

This is the command I use:

sudo doveadm move -u $USER "$DESTINATION_MBOX" user $USER mailbox "$SOURCE_MBOX" ALL

I suspect it may be linked to choosing the wrong "form" of the command, but as I'm running out of disk space, I'm afraid to test without understanding the mechanism better.

This is on Debian Bullseye, with dovecot v2.3.13 and the format is mdbox.

1 Answer 1

0

The expunge command will cause the refcount of the impacted emails to be set to 0, until the next "doveadm purge" command is run and all emails with refcount=0 are deleted from disk, usually as part of a periodical cron job.

You can trigger the purge command manually, and I even had a situation where two purge commands were run at the same time, without any ill behavior at all.

sudo doveadm move -u $USER "$DESTINATION_MBOX" user $USER mailbox "$SOURCE_MBOX" ALL && 
sudo doveadm deduplicate -u $USER "$DESTINATION_MBOX" &&
sudo doveadm purge -u $USER

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .