Attempting to determine the disk usage for an email account using "
du" is greater than the usage reported within
cPanel >> Email Accounts
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.
In the following example, the cPanel interface (
cPanel >> Email Accounts) would report the user (email@example.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
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.
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