2 # Collect some mail stats from Postfix for Zabbix.
3 # sven@timegate.de - 2010-05-17
7 qdir=`/usr/sbin/postconf -h queue_directory`
9 while getopts ":idsh" opt; do
12 find $qdir/deferred -type f -print | wc -l | awk '{print $1}'
15 find $qdir/incoming $qdir/active $qdir/maildrop -type f -print|wc -l|awk '{print $1}'
19 $(du -bs /var/opt/mailhome|cut -f1) + \
20 $(du -bs /home/sven/Maildir|cut -f1) + \
24 echo "Mailq stats $VERSION"
26 echo "-d Outputs number of mails in the deferred queue"
27 echo "-i Outputs number of mails in the incoming, active and maildrop queue"
28 echo "-s Total size of the most used Maildir folders in bytes"
29 echo "-h Print this help"
33 echo "Unknown option: -$OPTARG"
34 echo "Try -h to get help"