{"id":5190,"date":"2015-09-06T07:53:00","date_gmt":"2015-09-05T23:53:00","guid":{"rendered":"http:\/\/rmohan.com\/?p=5190"},"modified":"2015-09-06T07:56:12","modified_gmt":"2015-09-05T23:56:12","slug":"specific-email-address-from-your-mail-queue","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5190","title":{"rendered":"Specific Email Address From Your Mail Queue"},"content":{"rendered":"<p>You can check your current mail queue like this:<\/p>\n<p class=\"command\">postqueue -p<\/p>\n<p>To delete all mails from the mail queue that come from <span class=\"system\">falko@example.com<\/span> or are sent to<span class=\"system\">falko@example.com<\/span> (the command is the same regardless of if it&#8217;s the sender or recipient address), you can use this command:<\/p>\n<p class=\"command\">mailq | tail +2 | awk &#8216;BEGIN { RS = &#8220;&#8221; } \/ falko@example\\.com$\/ { print $1 }&#8217; | tr -d &#8216;*!&#8217; | postsuper -d &#8211;<\/p>\n<p>Afterwards check your mail queue again:<\/p>\n<p class=\"command\">postqueue -p<\/p>\n<p class=\"command\">mailq | tail +2 | grep -v &#8216;^ *(&#8216; | awk &#8216;BEGIN { RS = &#8220;&#8221; } { if ($8 == &#8220;email@address.com&#8221; &amp;&amp; $9 == &#8220;&#8221;) print $1 } &#8216; | tr -d &#8216;*!&#8217; | postsuper -d &#8211;<\/p>\n<p>Afterwards check your mail queue again:<\/p>\n<p class=\"command\">postqueue -p<\/p>\n<p class=\"command\">\n<p class=\"command\">\n<p class=\"command\">postqueue -p | tail -n +2 | awk &#8216;BEGIN { RS = &#8220;&#8221; } \/ byrdsnestquilt@bellsouth\\.net\/ { print $1 }&#8217; | tr -d &#8216;*!&#8217; | postsuper -d &#8211;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can check your current mail queue like this:<\/p>\n<p class=\"command\">postqueue -p<\/p>\n<p>To delete all mails from the mail queue that come from falko@example.com or are sent tofalko@example.com (the command is the same regardless of if it&#8217;s the sender or recipient address), you can use this command:<\/p>\n<p class=\"command\">mailq | tail +2 | awk &#8216;BEGIN [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5190"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5190"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5190\/revisions"}],"predecessor-version":[{"id":5195,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5190\/revisions\/5195"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}