Here we’ve got a very small, but effective script that alerts when a PostFix queue grows beyond a predefined limit. In my environment, PostFix is being used by an outbound relay. This script can work in tandem with my other mail queue monitoring script (Exim Mail Queue Monitor).
A small bash script designed to run automatically and periodically (CRON) on sending hosts, i.e. shared web servers primarily. This monitors the size of the overall Exim mail queue (both inbound and outbound) and alerts via email when the queue grows beyond a pre-defined limit. Email provides information on top sending domains, or top recipient domains if inbound.