{"id":900,"date":"2011-11-29T12:23:49","date_gmt":"2011-11-29T12:23:49","guid":{"rendered":"http:\/\/serverslot.com\/?p=900"},"modified":"2013-02-21T08:33:08","modified_gmt":"2013-02-21T08:33:08","slug":"how-to-delete-email-queue-through-command-line-or-ssh","status":"publish","type":"post","link":"https:\/\/serverslot.com\/hosting-issues\/how-to-delete-email-queue-through-command-line-or-ssh\/","title":{"rendered":"How to delete email QUEUE through command line or SSH"},"content":{"rendered":"<p><em><strong>How you can delete email QUEUE through command line or SSH<\/strong><\/em><\/p>\n<p>If you are unable to delete your email queue from your WHM\/Cpanel then you can use command line interface or SSh to delete your email queue, some time due to hacking or spamming that queue gonna be maximum and unabale to delete through Cpanel, so than through ssh you can delete that queue using this command.<\/p>\n<p><script type=\"text\/javascript\">\/\/ < ![CDATA[\ngoogle_ad_client = \"ca-pub-6441688276343625\";\n\/* serverslot small horizontal *\/\ngoogle_ad_slot = \"7309259884\";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n\/\/ ]]><\/script><br \/>\n<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\/\/ < ![CDATA[\n\n\/\/ ]]><\/script><\/p>\n<p><span style=\"color: #ff0000;\">\/var\/spool\/mail\/root<\/span> is the place from were you can remove the mails,<br \/>\nif you want to remove mails of root, you can delete them from here <span style=\"color: #ff0000;\">\/var\/spool\/mail\/root<\/span><br \/>\nOR if you want to to remove the mails of a user then <span style=\"color: #ff0000;\">go \/var\/spool\/mail\/username<\/span><\/p>\n<p>If you want to remove the mails from the exim then follow the following commands<\/p>\n<ul>\n<li>exim -bp<\/li>\n<\/ul>\n<p>Through this above command you will get some IDs like:<\/p>\n<ul>\n<li>exim -bp\u00a012d 3.0K 1Qe0j7-0004Fa-5x root@xxx.xxx.xxx.xx<\/li>\n<\/ul>\n<p>After above command use below command to delete that specific message<\/p>\n<ul>\n<li>exim -Mrm {message-id}<\/li>\n<\/ul>\n<p>If you want to remove <span style=\"color: #ff0000;\">all the messages from exim queue<\/span>, use below command, it will delete every thing in exim mail queue<\/p>\n<ul>\n<li># exim -bp | awk &#8216;\/^ *[0-9]+[mhd]\/{print &#8220;exim -Mrm &#8221; $3}&#8217; | bash<\/li>\n<\/ul>\n<p>If you want to delete\u00a0frozen\u00a0messages, you may try below given commands<\/p>\n<ul>\n<li>exiqgrep -z -i | xargs exim -Mrm<\/li>\n<\/ul>\n<p>Alternate command to delete frozen mails<\/p>\n<ul>\n<li>exim -bp | awk \u2018$6 == \u201cfrozen\u201d {print $3}\u2019 | xargs exim -Mrm<\/li>\n<\/ul>\n<p>You can check number of\u00a0frozen\u00a0email through below given command<\/p>\n<ul>\n<li>exim -bp | grep frozen | wc -l<\/li>\n<\/ul>\n<div>Both these below command also have the ability to delete the whole email queue<\/div>\n<ul>\n<li>exim -bpru|awk {&#8216;print $3&#8217;}|xargs exim -Mrm<\/li>\n<\/ul>\n<p>If that command will not work, you may try<\/p>\n<ul>\n<li>exim -bp | grep \\&lt; | awk &#8216;{print $3}&#8217; | xargs exim -Mrm<\/li>\n<\/ul>\n<p><script type=\"text\/javascript\">\/\/ < ![CDATA[\ngoogle_ad_client = \"ca-pub-6441688276343625\";\n\/* serverslot small horizontal *\/\ngoogle_ad_slot = \"7309259884\";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n\/\/ ]]><\/script><br \/>\n<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\/\/ < ![CDATA[\n\n\/\/ ]]><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How you can delete email QUEUE through command line or SSH If you are unable to delete your email queue from your WHM\/Cpanel then you \u2026 <a href=\"https:\/\/serverslot.com\/hosting-issues\/how-to-delete-email-queue-through-command-line-or-ssh\/\">more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/serverslot.com\/hosting-issues\/wp-json\/wp\/v2\/posts\/900"}],"collection":[{"href":"https:\/\/serverslot.com\/hosting-issues\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serverslot.com\/hosting-issues\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serverslot.com\/hosting-issues\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/serverslot.com\/hosting-issues\/wp-json\/wp\/v2\/comments?post=900"}],"version-history":[{"count":0,"href":"https:\/\/serverslot.com\/hosting-issues\/wp-json\/wp\/v2\/posts\/900\/revisions"}],"wp:attachment":[{"href":"https:\/\/serverslot.com\/hosting-issues\/wp-json\/wp\/v2\/media?parent=900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serverslot.com\/hosting-issues\/wp-json\/wp\/v2\/categories?post=900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serverslot.com\/hosting-issues\/wp-json\/wp\/v2\/tags?post=900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}