[whishlist] new option for 'doveadm purge'

Michael Grimm trashcan at ellael.org
Sun Dec 8 22:10:55 EET 2019


Hi,

I do store mail in mdbox format of 150m in size (dovecot 2.3.9). 

Once in a while I do experience mdbox files of smaller size, even after applying 'doveadm purge' and previous expunges by the users. like:

-rw-------  1 vmail  dovecot  104854595 Feb  9  2019 /var/mail/.maildirs/userX/storage/m.22
-rw-------  1 vmail  dovecot   29088478 Mar  8  2019 /var/mail/.maildirs/userX/storage/m.31
-rw-------  1 vmail  dovecot   98210890 Mar 20  2019 /var/mail/.maildirs/userX/storage/m.39

(Currently the counter is at file number 129.)

Well, I never experienced missing mail or alike, but these "holes" in filesize irritates me, and yes, it is more or less a cosmetic issue. 

Nevertheless, I do sometimes want to get rid of these "holes" by backing up all mail and re-injecting the backup into a vanilla account of that user. And I used this approach when I wanted to store all mail messages in larger mdbox files; again, rather a cosmetic issue.

BUT that takes a very, very long time contrary to the speed of 'doveadm purge'. Unfortunately, that command starts somewhere with more recent mdbox files and never from scratch (oldest mdbox file).

Whishlist: Would it be much of an effort to implement an option like:

	'doveadm purge -f' 
	and '-f' standing for 'force' or 'from scratch' or 'from the very first message found' or 'you name it'?

Thanks in advance and thanks for Dovecot and with kind regards,
Michael



More information about the dovecot mailing list