SOLVED Email disk Usage ignoring Trash folder

plague

Well-Known Member
Sep 22, 2006
67
14
158
Brasil
cPanel Access Level
Root Administrator
Twitter
Hello.

The cpanel interface is showing the email disk usage wrong and seems to be ignoring the .Trash folder.
I have this account using 929M 100% in the .Trash folder:

Code:
[[email protected] mail]# du -sh domain/user/
929M    domain/user/

[[email protected] mail]# du -sh domain/user/.Trash/
929M    domain/user/.Trash/

/
Cpanel shows zero bytes usage for this account:
0 bytes / 1.000 MB

I already removed the maildirsize file from this account and executed:

/scripts/generate_maildirsize --confirm --verbose USER

The maildirsize is recreated with the wrong usage (zero bytes)

[[email protected] mail]# cat domain/user/maildirsize
1048576000S
0 0

I created a test account in the same domain and copied some mail files to this test account and executed the generate_maildirsize command again.
In the test account, when the files are inside the .Trash folder, maildisize is generated as zero usage.

Then I moved the mail files from from the ".Trash" folder to the "cur" folder, executed the generate_maildirsize command again and now the maildirsize file was generated correctly in this test account.

I am not sure if this the normal behavior of ir it is a bug since the "Disk Usage" report show the .Trash folder usage separetedly as "Other Usage"
 

plague

Well-Known Member
Sep 22, 2006
67
14
158
Brasil
cPanel Access Level
Root Administrator
Twitter
Hello @cPanelLauren

It was the Mailserver Configuration indeed, I fogot to update this post.
I did
Code:
sed -i -e "s/include_trash_in_quota.*/include_trash_in_quota: 1/g" /var/cpanel/conf/dovecot/main
/scripts/builddovecotconf
/scripts/restartsrv_dovecot
/scripts/generate_maildirsize --confirm --verbose USER
and it fixed the size.
 
  • Like
Reactions: cPanelLauren