Subversion Repositories sysadmin_scripts

Rev

Blame | Last modification | View Log | Download | RSS feed

#!/bin/bash

#getmailq.sh - written by Valec 2006. Steal and share.
#Get postfix queue lengths

#Place in /usr/local/bin/
#extend .1.3.6.1.4.1.2021.53.101.0 mailq /usr/local/bin/getmailq.sh

PATH=$PATH:/usr/sbin/
QUEUES="incoming active deferred hold"

for i in $QUEUES; do
        COUNT=`sudo qshape $i | grep TOTAL | awk '{print $2}'`
        printf "$i:$COUNT "
done