Symptoms
After updating your cPanel account's primary domain name and username, you are not able to delete any email accounts you have already created.
The interface also shows the following error:
Description
Once the cPanel username/primary domain name has been updated, it does not update the passwd file within the cPanel account. This unintended behavior will prevent you from removing any email accounts due to insufficient ownership.
whereWe've opened an internal case for our development team to investigate this further. For reference, the case number is CPANEL-37928. Follow this article to receive an email notification when a solution is published in the product.
Workaround
Update the passwd file with the cPanel username
chown $cPuser:$cPuser /home/$cPUser/etc/$your-domain.com/passwd
**Please substitute $cPuser to your actual cPanel username, and $your-domain.com to the affected domain name of the email account**