The Blog

Simple script that can save you from blacklist. Posted on

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('/usr/local/psa/admin/sbin/mailqueuemng -s');

$y = explode("\n", $x);

foreach($y as $z){
$a = explode(":", $z);
$out[trim($a[0])] = trim($a[1]);
}

if ($out['Messages total'] > 100) {

mail('[email protected]', 'Email Problems', print_r($out, true));
}

This entry was posted in Linux, PHP, PLESK. Bookmark the permalink.

Please Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *



CAPTCHA
Change the CAPTCHA codeSpeak the CAPTCHA code