Symptoms
Attempting to determine the disk usage for an email account using "du
" is greater than the usage reported withincPanel >> Email Accounts
Description
Checking an email account's disk usage via the command line using the "du
" utility may often report more usage than what is seen in the cPanel interface.
Example:
In the following example, the cPanel interface (cPanel >> Email Accounts
) would report the user (cptech@domain.com) as using only ~7G.
However, using "du
" would show that there is actually 10G in total in the user's directory.
[root@the ~]$ du --max-depth=1 -ch /home/domain/mail/domain.com/cptech/|sort -rh
10G total
10G /home/domain/mail/domain.com/cptech/
1.4M /home/domain/mail/domain.com/cptech/.Sent
7G /home/domain/mail/domain.com/cptech/cur
3G /home/domain/mail/domain.com/cptech/.Trash
8.0K /home/domain/mail/domain.com/cptech/.Archive
4.0K /home/domain/mail/domain.com/cptech/.Junk
0 /home/domain/mail/domain.com/cptech/tmp
0 /home/domain/mail/domain.com/cptech/new
The reason for this is because any email in the Trash directory is not reported as usage. Instead, this is counted under the section "Other Usage
" inside of cPanel >> Disk Usage
.
The following is stated as well for the description of files located within the "Other Usage
" section.
>The files outside of your home directory
>The metadata that the system uses to store email in the mail directory
>The email in Trash folders
>The files that you do not have permission to access.
Workaround
Use the interface to obtain the correct disk usage, or use the following API.
uapi --user=username Email get_disk_usage user=user domain=example.com
Comments
0 comments
Article is closed for comments.