{"id":970,"date":"2016-11-11T19:51:15","date_gmt":"2016-11-12T00:51:15","guid":{"rendered":"http:\/\/xfloyd.net\/blog\/?p=970"},"modified":"2016-11-11T19:52:28","modified_gmt":"2016-11-12T00:52:28","slug":"simple-script-that-can-save-you-from-blacklist","status":"publish","type":"post","link":"http:\/\/xfloyd.net\/blog\/?p=970","title":{"rendered":"Simple script that can save you from blacklist."},"content":{"rendered":"<p>This simple php scrips can be run by cron job once an hour to let you know if the qmail queue is getting full.<\/p>\n<p><code><br \/>\n$x = shell_exec('\/usr\/local\/psa\/admin\/sbin\/mailqueuemng -s');<\/p>\n<p>$y = explode(\"\\n\", $x);<\/p>\n<p>foreach($y as $z){<br \/>\n\t$a = explode(\":\", $z);<br \/>\n\t$out[trim($a[0])] = trim($a[1]);<br \/>\n}<\/p>\n<p>if ($out['Messages total'] > 100) {<\/p>\n<p>\tmail('resonsible@domain.com', 'Email Problems', print_r($out, true));<br \/>\n}<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This simple php scrips can be run by cron job once an hour to let you know if the qmail queue is getting full. $x = shell_exec(&#8216;\/usr\/local\/psa\/admin\/sbin\/mailqueuemng -s&#8217;); $y = explode(&#8220;\\n&#8221;, $x); foreach($y as $z){ $a = explode(&#8220;:&#8221;, $z); $out[trim($a[0])] = trim($a[1]); } if ($out[&#8216;Messages total&#8217;] > 100) { mail(&#8216;resonsible@domain.com&#8217;, &#8216;Email Problems&#8217;, print_r($out, true)); }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,4,7],"tags":[],"_links":{"self":[{"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/970"}],"collection":[{"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=970"}],"version-history":[{"count":3,"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/970\/revisions"}],"predecessor-version":[{"id":973,"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/970\/revisions\/973"}],"wp:attachment":[{"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=970"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}