Error Failed to lookup mailbox status: Mailbox doesn’t exist appears when trying to access the Email Disk Usage section in cPanel. This utility allows you to recover disk space by deleting old messages from your mailbox but one of the cPanel accounts reported the following error message when trying to access it:
The error message is simple and states that the account email@example.com does no longer exists, but why is this an issue? Because the email account was not deleted properly and there were still some leftover dovecot files.
On cPanel files associated with email accounts are stored inside users’ mail and etc directories.
Inside the mail directory there were no files for the mentioned email account:
But inside the etc folder there were still some files associated with this email account:
After deleting those files the error message was gone and the Email Disk Usage section was working as expected