{"id":1214,"date":"2010-12-27T12:06:54","date_gmt":"2010-12-27T16:06:54","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=1214"},"modified":"2013-03-20T08:43:57","modified_gmt":"2013-03-20T12:43:57","slug":"plesk-cannot-remove-maildomainclient-mailmng-failed-some-errors-occured","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/plesk-cannot-remove-maildomainclient-mailmng-failed-some-errors-occured","title":{"rendered":"Plesk: cannot remove email\/domain\/client: mailmng failed: Some errors occured"},"content":{"rendered":"<p>If the mail handlers in Plesk are corrupt, you will be unable to remove the email account OR a domain from the Plesk control panel and will result in the following error<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<blockquote><p><span style=\"color: #0000ff;\">mailmng failed: Some errors occured. See log for details<br \/>\n0: class.MailManager.php:242<br \/>\nMailManager::execWithException(string &#8216;smart_exec&#8217;, string &#8216;mailmng&#8217;, array, array, string &#8216;lst&#8217;)<br \/>\n1: class.MailManager.php:274<br \/>\nMailManager-&gt;callMailManager(string &#8216;remove-mailname&#8217;, array)<br \/>\n2: class.MailManager.php:354<br \/>\nMailManager-&gt;removeMailname(string &#8216;domain.tld&#8217;, string &#8217;emailid&#8217;)<\/span><\/p><\/blockquote>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p><strong>The one of the following 3 methods can be used to resolve the issue:<\/strong><\/p>\n<p><strong>1)<\/strong> To remove and re-create the mail handlers using the &#8216;mchk&#8217; script and then deleting the email account from Plesk. For detailed steps, click <strong><a title=\"here\" href=\"https:\/\/linuxhostingsupport.net\/blog\/call_handlers-defer-during-call-usrlocalpsahandlersinfo05-grey-tqyvhgexecutable-handler-or-message-cannot%20%20-be-delivered-and-error-unable-to-stat-entry\" target=\"_blank\">here<\/a><\/strong><\/p>\n<p><strong>2) <\/strong>To remove the email account via SSH.<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># \/usr\/local\/psa\/bin\/mail --remove email@domain.tld<\/span><\/pre>\n<\/blockquote>\n<p><strong>3)<\/strong> If the above 2 methods doesn&#8217;t work, remove the email account from the Plesk database manually (backup the &#8216;psa&#8217; database first).\u00a0<strong> <\/strong><\/p>\n<p><strong>Let&#8217;s use the email ID as &#8220;xyz@abc.com&#8221; as an example here<\/strong> (of-course, it should be replaced with the actual values in your queries).<\/p>\n<p>Connect to the psa database from SSH:<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># mysql -uadmin -p`cat \/etc\/psa\/.psa.shadow` psa<\/span><\/pre>\n<\/blockquote>\n<p>Retrieve the domain ID of abc.com<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\">mysql&gt; select id from domains where name=\"abc.com\";<\/span><\/pre>\n<\/blockquote>\n<p>Now, first we will delete the password of the email account from the &#8216;accounts&#8217; table by executing the below query:<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\">mysql&gt; delete from accounts where id in <\/span><span style=\"color: #0000ff;\">(select mail.id from \\<\/span><\/pre>\n<pre><span style=\"color: #0000ff;\">mail INNER JOIN domains ON mail.dom_id=domains.id where <\/span><span style=\"color: #0000ff;\">\\<\/span><\/pre>\n<pre><span style=\"color: #0000ff;\">domains.name=\"abc.com\" AND mail.mail_name=\"xyz\");<\/span><\/pre>\n<\/blockquote>\n<p>Now, delete the email name &#8216;xyz&#8217; from the &#8216;mail&#8217; table (replace &#8216;ID&#8217; with the id retrieved from the first query)<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\">mysql&gt; delete from mail where dom_id='ID' AND mail_name='xyz';<\/span><\/pre>\n<\/blockquote>\n<p>Once done, restart the Mysql service and you will be able to remove the email account from the Plesk control panel.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If the mail handlers in Plesk are corrupt, you will be unable to remove the email account OR a domain from the Plesk control panel and will result in the following error<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nmailmng failed: Some errors occured. See log for details<br \/>\n0: class.MailManager.php:242<br \/>\nMailManager::execWithException(string &#8216;smart_exec&#8217;, string &#8216;mailmng&#8217;, array, array, string &#8216;lst&#8217;)<br \/>\n1: class.MailManager.php:274<br \/>\nMailManager-&gt;callMailManager(string &#8216;remove-mailname&#8217;, array)<br \/>\n2: class.MailManager.php:354<br \/>\nMailManager-&gt;removeMailname(string &#8216;domain.tld&#8217;, string &#8217;emailid&#8217;)<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nThe one of the following 3 methods can be used to resolve the issue:<br \/>\n1) To remove and re-create the mail handlers using the &#8216;mchk&#8217; script and then deleting the email account from Plesk. For [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1155,1157,1156,1153],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1214"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=1214"}],"version-history":[{"count":40,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1214\/revisions"}],"predecessor-version":[{"id":2268,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1214\/revisions\/2268"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=1214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=1214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=1214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}