SOLVED [CPANEL-26448] Default Email Account Showing Incorrect Usage

Status
Not open for further replies.

DarkxPunk

Well-Known Member
Sep 2, 2012
45
1
133
cPanel Access Level
Root Administrator
Hi there,

In one of the accounts on my server I noticed the default account showing high usage. I checked the webmail, everything is empty, I also tell mail to be rejected rather than collect if no email address exists. Now upon further investigation I noticed this:

- Removed -

For some reason one of the domains mailbox usage (or I assume that's what it is) is being displayed as being apart of the default account. No idea where to start.

Thanks for the help!
 
Last edited by a moderator:

rpvw

Well-Known Member
Jul 18, 2013
1,101
470
113
UK
cPanel Access Level
Root Administrator
You could try running
Code:
# /scripts/generate_maildirsize --confirm --verbose $username
or
Code:
# doveadm quota recalc -u $username
 

DarkxPunk

Well-Known Member
Sep 2, 2012
45
1
133
cPanel Access Level
Root Administrator
@cPanelLauren @rpvw

First command reset the value for the default email account back to 0. However after viewing the disk usage the size repopulated. I ran the first command again it went back to 0, ran the second command and again the size repopulated. Something is clearly bugged.
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
470
113
UK
cPanel Access Level
Root Administrator
Have a look in Tweak Settings under System for:
Cache disk quota information
Setting this option to On causes WHM to cache disk usage information. This may result in disk usage information being up to 15 minutes out-of-date. Setting this option to Off will provide more up-to-date data, but may significantly slow your server’s performance.
If this is switched ON (default), you may have to wait up to 15 mins before the disk usage size changes to reflect the correct value.
 
  • Like
Reactions: cPanelLauren

DarkxPunk

Well-Known Member
Sep 2, 2012
45
1
133
cPanel Access Level
Root Administrator
@rpvw

Many hours later I checked and the issue remained. Ran command again and waited a bit over 30 minutes, again issue remained. For some reason the default account is bundling with it other accounts, I don’t think it’s miscalculating I think files are being associated with the wrong place.
 

DarkxPunk

Well-Known Member
Sep 2, 2012
45
1
133
cPanel Access Level
Root Administrator
@cPanelLauren

I am not sure what number you are looking for because all the domains are in this folder, but:
.spam - tmp - .Trash - .Sent - cur - new - .Archive - .Drafts - .Junk totals 176k

So def not the number its finding. But again it's reading the content of a domain not just its own folders.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,291
313
Houston
Hi @DarkxPunk

I was actually wanting to compare the two (what's being seen in the UI as compared to what's actually there).
Please feel free to open a ticket using the link in my signature. Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!
 

tonyotonio

Member
Dec 27, 2015
9
3
53
Philippines
cPanel Access Level
Root Administrator
Hello,

Experiencing the same thing here.

Ran
/scripts/generate_maildirsize --confirm --verbose $username

Defaukt account shows correct size now, but re-opening the mailbox returns value to the erroneous one.
Doing:
du -shc mail/*
du -h --max-depth=1

Shows actual sizes, which doesnt match what's being displayed.
Seems like its its theme that's causing error?
Quotas seems to be fine, WHM also seems to show correct size.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,291
313
Houston
Hi @Anthony Chua


That shouldn't actually be causing the issue. In the case of the OP the issue seems to be related to the use of symlinks in mail dir per the ticket that was opened In order for the account to show 0, you would need to remove the symlinks. This will, however, prevent the default email account from accessing those email accounts. The disk usage shown in this interface is not actually impacting the cPanel account's disk usage.
 
  • Like
Reactions: Metro2

Metro2

Well-Known Member
May 24, 2006
568
94
178
USA
cPanel Access Level
Root Administrator
Same exact issue here - almost every user account I check shows large figure for the "default" account which is not being used.

Just for example:

[email protected] [/home/example/mail]# du -h --max-depth=1
24K ./.spam
4.0K ./new
667M ./example.com
4.0K ./tmp
4.0K ./cur
24K ./.Junk
24K ./.Drafts
24K ./.Archive
24K ./.Sent
24K ./.Trash
667M .

But despite their being no email in the "default" account, and it's absolutely empty, in cPanel > Email Accounts in this particular example it shows over 300mb being used in the Default email account.

Deleting all of the maildirsize files in the user's account and letting them regenerate will make it show 0mb for a while, same as running /scripts/generate_maildirsize --confirm --verbose example

But still eventually the large number comes back for the empty default account.

@cPanelLauren - your last response was informative and educational for sure, thank you, but I'm still a bit mystified by this behavior. The whole reason I even came here and searched the forums today / discovered this thread, is because I got a ticket from a customer asking "why?" about this. I knew eventually a customer would not only notice but also contact me, and today "eventually" happened. It's nice that I can cite your "The disk usage shown in this interface is not actually impacting the cPanel account's disk usage" message to clients to give them some assurance, but it would be really nice to have a way to easily explain this phenomenon to users when in all honesty I'm a little confused by it myself. Is there a way to safely remove the symlinks that you mentioned across the board for all users? And an example of how to do it safely for one user account as well?

Thanks for all the info everyone has shared so far.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,291
313
Houston
As it turns out a case was opened for this behavior over the weekend. CPANEL-26448 - Accessing webmail for default cPanel account adds all email quota from all other email accounts to it.

Right now the workaround should be to run the generate_maildirsize script but when you log in to the default account again it will revert changes.

I'll keep you posted in this thread as to the status of the internal case and when it's resolved.

Thanks!
 
  • Like
Reactions: Metro2
Status
Not open for further replies.