29.01.21 11:46 +0100, Aki Tuomi:
On 29/01/2021 12:41 Markus Schönhaber <dovecot@list-post.mks-mail.de> wrote:
Hello,
on a system I administer the disk where Dovecot's mailstore (mdbox) resides got filled up to the brim although the combined quotas for the users are much smaller than the disk's capacity.
For one user I see the following:
doveadm quota get -u <USER>@<DOMAIN> Username Quota name Type Value Limit % <USER>@<DOMAIN> User quota STORAGE 10231248 20971520 48 <USER>@<DOMAIN> User quota MESSAGE 11176 - 0
So this user has used ~10G of his 20G quota. But looking at the space used on disk:
# du -hs /var/spool/vmail/mail/<DOMAIN>/<USER>/storage/ 90G /var/spool/vmail/mail/<DOMAIN>/<USER>/storage/
What might be the reason that mail size and disk space used differ so much? And most of all: how can I prevent that from happening?
mdbox format requires you to periodically run
doveadm purge -u user
to cleanup deleted mails from the mdbox storage. mdbox has feature that you can use mail_location mdbox_deleted to access any deleted emails if you need to recover them, but it also requires you to purge the storage now and then.
Thanks for your answer, Aki! I will configure a cron-job to purge the user's mailstore.
Nevertheless, since this is a very low volume server and the user in question only sends and receives a few dozen mails, weighing a hand full of MB, per day, I'm at a loss to understand how it's possible that in the user's mailstore 80G of deleted but not purged mail can pile up in just about a week(!). This has happend a couple of times during the last month. And after it happened the last time (8 days ago), I had manually purged the user's mailstore reducing ist's size back to the ~10G that are reasonable. Since then it has grown to the 90G I mentioned above.
So, if you have any idea what to check or what measures to take to help me find out what's happening there, that woud be great! I'll start to log the mailstore size regularly to be able follow the growth over time but maybe there's something I could tell Dovecot to do...
-- Regards mks