No qmailrocks tem ele dizendo. a forma de instalar mas eu ingasguei em umas partes.

# cd /downloads/qmailrocks/
# tar zxvf qmailanalog-0.70.tar.gz
# cd qmailanalog-0.70

// Ai ele fala que tem que aplicar o patch para as distros (RH 9/RHEL/Fedora/Slackware)

# patch < /downloads/qmailrocks/patches/0.70-errno.patch

# make && make setup check

// Até aqui está instalado. Agora ele fala para instalar o qlogtools

# cd /downloads/qmailrocks/
# tar zxvf qlogtools-3.1.tar.gz
# cd qlogtools-3.1
// Informa novamente que precisa aplicar o patch (RH 9/RHEL/Fedora/Slackware)

# patch < /downloads/qmailrocks/patches/qlogtools_errno.patch
# mkdir /usr/local/man
# make
# ./installer

// OK. The qlogtools library of tools should now be installed.
// OK as libs do qlogtools agora deversão estar instaladas.
// Ai ele fala para ajustar o script do qmailanalog e nessa parte mi confundi.

# cp /downloads/qmailrocks/qms-analog-0.4.2/qmailstats /var/qmail/bin
# vi /var/qmail/bin/qmailstats

AGORA MI CORRIJA SE PUDER

#!/bin/sh
## qms-analog and qmailanalog invocation script
##
## Note: For better readability of the nightly stats email, set your email
## client font to a fixed width font - then all the columns line up
## very nicely.
##

PATH=/usr/local/qmailanalog/bin:/var/qmail/bin:/bin:/usr/bin:/usr/local/bin
QMAILSTATS="/tmp/q.$$"
EMAILMSG="/tmp/qms.$$"
umask 077
DATE=`date +'%D'`

## prepare qmail log entries for qmailanalog routines
cat /var/log/qmail/qmail-send/* /var/log/qmail/qmail-pop3d/* /var/log/qmail/qmail-smtpd/* | tai64n2tai | awk '{$1=substr($1,1,index($1,".")+6);print}' | matchup > $QMAILSTATS 5>/dev/null

## build the email message header
echo "To: postmaster@spyderlinux.com.br" > $EMAILMSG
echo "From: postmaster@spyderlinux.com.br" >> $EMAILMSG
echo "Subject: Nightly Qmail Stats Report for $DATE" >> $EMAILMSG
echo "" >> $EMAILMSG
echo "" >> $EMAILMSG

## qms-analog invocation
#
# USAGE: qms-analog hours-of-history <sort-key>
#
# hours-of-history (0 - n) hours of history to collect
# 0 => all records
# sort-key (optional) sort key for account statistics
# msgbw (default) msg bandwidth - successful msgs
# alpha alphanumeric by account name
# virus number of viruses received
# saavg Spamassassin avg score
# sadet Spamassassin msgs detected
#
# Examples:
# "qms-analog 24" - use only records within the last 24 hours,
# sort by msg bandwidth
# "qms-analog 168" - use only records within the last 7 days,
# sort by msg bandwidth
# "qms-analog 0" - use all records, sort by msg bandwidth
# "qms-analog 0 alpha" - use all records, sort alphabetically
# "qms-analog 0 saavg" - use all records, sort by Spam average score
#
# Note: Add or remove statistical time frames to suit your preference -
# "last 24 hours" and "all records" are uncommented below by default.
##

#### Last 24 hours
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~ L a s t 2 4 H o u r s ~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
cat /var/spool/qmailscan/qms-events.log | qms-analog 24 >> $EMAILMSG
####

Somente isso ?

Como eu estou realizando um teste do mesmo num servidor de e-mail 2 com qmail onde serve para envios apenas e não recebimento eu fiquei encucado na seguinte linha:


## prepare qmail log entries for qmailanalog routines
cat /var/log/qmail/qmail-send/* /var/log/qmail/qmail-pop3d/* /var/log/qmail/qmail-smtpd/* | tai64n2tai | awk '{$1=substr($1,1,index($1,".")+6);print}' | matchup > $QMAILSTATS 5>/dev/null




// SE PUDER DAR UMA AJUDA NISSO, OBRIGADO