SOLVED [CPANEL-23733] Incorrect email disk usage due to duplicated INBOX mailboxes

Misiek

Well-Known Member
Feb 23, 2004
116
0
166
cPanel Access Level
Root Administrator
Version :
  • CLOUDLINUX 6.9 standard [dedyk]
  • v68.0.36
One of my clients account have situation like on screens, mail site is saying he is using 2020 M but the email size subsite says he is using about 1400 MB how to solve this problem, tried to remove maildirsize and regenerate it but without a luck
Zrzut ekranu 2018-04-03 o 14.08.36.png Zrzut ekranu 2018-04-03 o 14.08.52.png
 
Last edited by a moderator:

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello,

Do you have Compress Messages enabled in "WHM >> MailServer Configuration"? ? If so, note that internal case CPANEL-17326 was implemented in cPanel & WHM version 70 to help reduce the confusion when customers check their disk usage in cPanel:

Fixed case CPANEL-17326: Clarify meaning of “Email Accounts” in cPanel Disk Usage.

The "Disk Usage" in cPanel will display the following note explaining the difference in the amount of disk space reported:

†Email account storage may occupy less space on the disk if you use compression or hard-link optimizations designed to save space. Email account storage does not include the metadata that the system uses to store email.

‡The files outside of your home directory, the metadata that the system uses to store email in the mail directory, or the files that you do not have permission to access.
Thank you.
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello,

It's possible this relates to internal case CPANEL-19556 where incorrect email disk usage is reported due to duplicated INBOX mailboxes. Can you run the following command and let us know the output?

Code:
ll /home/$username/mail/$domain/$email| grep INBOX
Replace $username with the cPanel username, $domain with the domain name, and $email with the name of the email account.

Thank you.
 

Misiek

Well-Known Member
Feb 23, 2004
116
0
166
cPanel Access Level
Root Administrator
Form the command You specified there is no output.
In cpanel the size shows 2022MB
The du command shows now
1443760 /home/$user/mail/$domain/$email
so 1,4GB
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello,

To update, it was determined the issue reported in the support ticket does in-fact relate to internal case CPANEL-19556. The case is open to address an issue where Dovecot counts the INBOX mail folder more than once. For anyone else facing the same issue, you can verify if this case is the culprit by running the following command:

Code:
doveadm mailbox list -u [email protected]
Normally, the output from this command will resemble this:

Code:
INBOX
INBOX.Trash
INBOX.Sent
INBOX.Junk
INBOX.Drafts
INBOX.spam
INBOX.Archive
However, in certain scenarios where ".INBOX.$SOMETHING" directories are created in the email account's mail directory, the output may also show additional entries which lead to the incorrect disk space calculation. EX:

Code:
INBOX.INBOX
INBOX.INBOX.Drafts 
INBOX.INBOX.Trash 
INBOX.INBOX.Sent
I'll monitor this case and update this thread with more information as it becomes available. In the meantime, the current workaround is to rename the ".INBOX.$SOMETHING" email directories. For example, if you were to see "INBOX.INBOX.Drafts" in the output from the command above, the commands to address the issue would be:

Code:
cd /home/$username/mail/$domain/$email-account/
mv .INBOX.Drafts/ .BadDrafts
/usr/local/cpanel/scripts/generate_maildirsize $cpanelusername --confirm
Thank you.
 

phil99

Member
Jun 10, 2018
24
6
3
UK
cPanel Access Level
Root Administrator
Hi
Is there any update on this issue? We recently came across this on a number of accounts. In one case the calculated size was 50% more than the real size, which caused a small problem when setting quotas.

In one case at least, this appears to be a bug/feature of the email client being used (K9-Mail on Android, [1]). Whilst the workaround posted sort of works, it is only a temporary fix, as the folders will be recreated again if they are used on the client.

It would be good however if the count could take this into account and correctly calculate the size.
Thanks.

[1] github.com/k9mail/k-9/issues/3005
Creates duplicate INBOX.Drafts, INBOX.Sent and INBOX.Trash folders · Issue #3005 · k9mail/k-9
 
Last edited by a moderator:

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello @phil99,

We determined this to be a bug with Dovecot itself and the issue was reported to them at:

Inbox quota usage doubled when mailbox_list_index enabled, under some circumstances

We do have an additional case, CPANEL-22518, that's open to include a script with cPanel & WHM that can be ran to automatically clean up the additional directories. I don't have a specific time frame to offer on that case, but I'll monitor it and update this thread with more information as it becomes available.

Thank you.
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello Everyone,

To update, we released the following case with cPanel & WHM version 76.0.5 to address this issue:

Fixed case CPANEL-23733: Add workaround for dovecot double counting of INBOX.INBOX

This version is currently published to the EDGE release tier, and should make it's way to the CURRENT release tier tomorrow. If all goes well, it will reach the RELEASE tier on Thursday. You can learn more about our release tiers by clicking here.

Thanks!