Symptoms
-
Plesk GUI Subscriptions > example.com > Statistics shows overuse by mail.
-
In Plesk GUI Domains > example.com > Email Addresses usage is normal.
-
Checking mail disk usage on the server shows different disk space usage from the one showed in Plesk GUI, e.g.:
# du -sh /var/qmail/mailnames/example.com/
4.7G /var/qmail/mailnames/example.com/ -
Checking mail disk usage on the server with the command including hardlinks shows the same disk usage as in Plesk GUI:
# du -shl /var/qmail/mailnames/example.com
348G /var/qmail/mailnames/example.com -
The most part of disk usage belong to one directory, e.g.
.Spam/tmp
or.Trash/cur
# du -shl /var/qmail/mailnames/example.com/user/Maildir/.Spam/tmp
345G /var/qmail/mailnames/example.com/user/Maildir/.Spam/tmp -
Directory size differs when checking not counting hardlinks:
# du -sh /var/qmail/mailnames/example.com/user/Maildir/.Spam/tmp
3G /var/qmail/mailnames/example.com/user/Maildir/.Spam/tmp
Cause
There are numerous hardlinked files under /var/qmail/mailnames/example.com/user/Maildir/.Spam/tmp
or /var/qmail/mailnames/example.com/user/Maildir/.Trash/cur
in the mailbox. These files are counted as separate files for the purposes of disk usage statistics.
Resolution
-
Connect to the server via SSH.
-
Clean the
/var/qmail/mailnames/example.com/user/Maildir/.Spam/
or/var/qmail/mailnames/example.com/user/Maildir/.Trash/cur
directory:# rm -rf /var/qmail/mailnames/example.com/user/Maildir/.Trash/cur/*
# rm -rf /var/qmail/mailnames/example.com/user/Maildir/.Trash/tmp/*
# rm -rf /var/qmail/mailnames/example.com/user/Maildir/.Spam/* - Recalculate disk usage statistics