Crazy email disk usage numbers after changing limits

petersconsult

Verified User
Joined
Sep 10, 2021
Messages
34
Hello all,
i had a little bit of a freakout today because i raised the disk space limit of an email account that was slightly over quota, and, when i raised the limit, the 'usage' jumped up as well, like so:
First, the account was 7.3GB of 7GB max..
i raised the max to 10GB (10240MB)
Suddenly the reported usage jumped to 13.56GB of 10GB!!!
So i had to raise the limit to 15GB (15360MB)
and now the account reports that it is 13.56GB of 150GB!!!

this same exact behavior has been reproduced with every single email account i tried, across multiple clients..

Every time i change the limit, the account reportedly grows by 85%..

However, if i look up the size of the accounts using du, i see they really have not changed:
in the case of the original account i spoke about above, doing this:
du -m --max-depth=1 /home/<USER>/imap/<domain.com>/<email>/Maildir

gives me this:
7366 <email>/Maildir

Which is correct..

The only thing i can think of that's different is that i recently enabled SpamAssassin..

i've cleared caches on my browser, tried a different browser, same thing..
i ran the following command:
echo 'action=tally&value=<domain.com>' >> /usr/local/directadmin/data/task.queue

i made sure that the following is not enabled:
pop_disk_usage_cache

i also tried going to the 'Site Summary/Statistics/Logs' -> Usage Statistics -> Disk Usage -> Update (the little triangle)

None of these has restored correct values..


Is there any other way to refresh these erroneous stats, as they also affect RoundCube?
Has anyone else run into this issue?
Any help or suggestions would be greatly appreciated!

Thank You!
 
Last edited:

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
1,564
Location
UA
what quota shows? maybe overlimit caused by file descriptors (inodes)?
 

petersconsult

Verified User
Joined
Sep 10, 2021
Messages
34
i'm not sure i understand..
This is what it looks like now..
 

Attachments

  • DA-du.jpg
    DA-du.jpg
    68.4 KB · Views: 5

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
1,564
Location
UA
looks like somewhere unpacked user backup, which included to quota.
quota -u USERNAME
in console in email partition
 

petersconsult

Verified User
Joined
Sep 10, 2021
Messages
34
but i've never used the backup system..
Also, this happens after i change the max. MB limit
 

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
1,564
Location
UA
start from quota and inodes, then you will find what takes so much space, or panel shows wrong size.
 

petersconsult

Verified User
Joined
Sep 10, 2021
Messages
34
Indeed, it's the panel showing the wrong size, and i can't get it to show the correct size..
 

petersconsult

Verified User
Joined
Sep 10, 2021
Messages
34
ok, so, the problem is the maildirsize file in each user's maildir..
For some reason, it's recording an inflated maildir size when i increase the maximum quota..

i've tried the following commands, to no avail:
Code:
doveadm quota recalc -u [email protected]
service dovecot restart

Has anyone encountered this?
Apparently, other panels have scripts to re-create these maildirsize files; does DA have something similar?
Does anyone know how to do it manually?

Thank you!
 

petersconsult

Verified User
Joined
Sep 10, 2021
Messages
34
ok, so i figured out what's happening..

i recently enabled spamassassin..

Evidently, spamassassin went and added a folder:
.INBOX.spam
inside Maildir (which would make its effective imap path .INBOX.INBOX.spam !!)

This empty folder is causing Dovecot to report a disk usage that is multiplied by 2..

Removing this folder and running
doveadm quota recalc -u [email protected]

Produces the correct result..

Now i just need to figure out why spamassassin is creating this .INBOX.spam folder and not simply using the .spam folder that already exists..
Does anyone know how spamassassin determines the default spam folder?

Thank You!
 
Top