Symptoms
A cPanel account's default email address is showing space usage but the email account doesn't contain email.
Description
On cPanel servers, the cPanel account email addresses are linked to the cPanel user's default email address, so they can all be managed in one place if needed or desired. Dovecot calculates these linked email accounts' space into what is shown as part of the user's quota. This isn't real usage, but linked usage.
Workaround
This can be cleared by removing the linked mailboxes.
1. Get a list for the user. You should see output similar to the following.
Please note that in this example, the user is cpaneluser and the domain is domain.tld. In the example commands noted, you would need to replace "cpaneluser" with the cPanel username.
[root@server ~]# doveadm mailbox list -u cpaneluser
INBOX
INBOX.acct2@domain_tld
INBOX.acct1@domain_tld
INBOX.Trash
INBOX.Sent
INBOX.Junk
INBOX.Drafts
INBOX.spam
INBOX.Archive
2. Remove the mailbox link using the following commands.
Please note, you will need to replace "INBOX.acct1@domain_tld" with the linked mailboxes of the list command output.
doveadm mailbox delete -u cpaneluser -s INBOX.acct1@domain_tld
3. Recalculate the quota:
doveadm quota recalc -u cpaneluser
4. Remove the Dovecot index files for the user:
Please note that the following command should only be performed if the mailbox is using maildir
/scripts/remove_dovecot_index_files --user cpaneluser
5. Regenerate the mail directory size:
/scripts/generate_maildirsize ---verbose -confirm --allaccounts cpaneluser
6. If the usage isn't showing right away in cPanel under Email Accounts then the change can be force updated by moving email_accounts.json. Example:
mv -v /home/$cpaneluser/.cpanel/email_accounts.json{,.$(date +%s)}
Comments
0 comments
Article is closed for comments.