There might be instances when the removal of email accounts from frontend fails in plesk control panel.
One of the following 2 methods can be used to resolve the issue:
♦ Remove the mail account via SSH.
# /usr/local/psa/bin/mail –remove email@example.com
♦ If the above method doesn’t work, remove the email account from the Plesk database manually (backup the ‘psa’ database first).
Let’s use the email ID as “firstname.lastname@example.org” as an example here (of-course, it should be replaced with the actual values in your queries).
Connect to the psa database from SSH:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
Retrieve the domain ID of abc.com
mysql> select id from domains where name=”abc.com”;
Now, first we will delete the password of the email account from the ‘accounts’ table by executing the below query:
mysql> delete from accounts where id in (select mail.id from \
mail INNER JOIN domains ON mail.dom_id=domains.id where \
domains.name=”abc.com” AND mail.mail_name=”xyz”);
Now, delete the email name ‘xyz’ from the ‘mail’ table (replace ‘ID’ with the id retrieved from the first query)
mysql> delete from mail where dom_id=’ID’ AND mail_name=’xyz’;
Once done, restart the MySQL service and you will be able to remove the email account from the Plesk control panel.
There are no revisions for this post.