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 though. This isn't real usage but is linked usage.
Workaround
This can be cleared by removing the linked mailboxes.
First, get a list for the user. In this example the user is cptest123 and the domain is cptestacct.com:
doveadm mailbox list -u cptest123
results in this output:
[root@cptestvm ~]# doveadm mailbox list -u cptest123
INBOX
INBOX.acct2@cptestacct_com
INBOX.acct1@cptestacct_com
INBOX.Trash
INBOX.Sent
INBOX.Junk
INBOX.Drafts
INBOX.spam
INBOX.Archive
The two linked mailboxes in this example are
INBOX.acct2@cptestacct_com
INBOX.acct1@cptestacct_com
And can be removed by running these commands:
doveadm mailbox delete -u cptest123 -s INBOX.acct1@cptestacct_com
doveadm mailbox delete -u cptest123 -s INBOX.acct2@cptestacct_com
Followed by these commands:
doveadm quota recalc -u cptest123
Note: The linked mailboxes may not be causing this issue, which may be due to the mailbox maildirsize data. Only perform this if the mailbox is using maildir:
/scripts/remove_dovecot_index_files --user <cpanel_username>
For example:
/scripts/remove_dovecot_index_files --user cptest123
Followed by this command:
/scripts/generate_maildirsize ---verbose -confirm --allaccounts cptest123
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/$user/.cpanel/email_accounts.json{,.old}
Comments
0 comments
Article is closed for comments.