To delete all mail from Postfix Mail server queue, run Example root@vm701:~# postsuper -d ALL postsuper: Deleted: 77 messages root@vm701:~# Back to Postfix
I created a php script to alert if mail queue size if above 100. <?php $cmd = ‘/usr/sbin/exim -bpc’; $num_mails = exec($cmd); if ($num_mails > 100) { $hostname = exec(‘/bin/hostname’); $subject = ‘Mail queue alert on ‘ . $hostname; $mail_text