Remove e-mail accounts in plesk server

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@domain.tld

♦ 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 “” 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

mysql> select id from domains where name=””;

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 from \

mail INNER JOIN domains ON where \”” 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.

Tags: , , ,

No comments yet.

Leave a Reply