From: Sheldon T. Hall (no email)
Date: Sun May 15 2005 - 14:12:22 EDT
Kevin Pang writes ...
> I added more lines on the page:
> http://www.vokaboly.de/temp/postfix.html ,
> (I don't post here due to the mailing-list achieves)
> Could you or anyone else please have a look? Thanks!
It's hard to tell anything from that, because you don't have all the log
entries for each piece of mail grouped together. This is normal, since the
log entries are chronological, but the pieces of mail take some time to be
processed.
Try something like this script ...
#!/bin/sh
#
# Show the history of each piece of mail postfix handles
#
# STH, 05/14/2005
prog=`basename $0`
tmp=/tmp/$prog.$$
LOG="/var/adm/SYSLOG.0 /var/adm/SYSLOG"
grep -h ' postfix' $LOG |\
uniq | sed -e 's/<>/(null-sender)/g' -e 's/\.\./ ./g' |\
tr -d '<>' > $tmp
echo
echo "History of Mail Items"
echo "---------------------"
for queueID in `awk 'BEGIN {print "NOQUEUE:"} \
/(qmgr.*removed$|cleanup.*reject:|cleanup.*discard:)/\
{print $6}' $tmp`
do
if ! echo "$doneq" | grep -q $queueID
then
doneq="$doneq $queueID"
echo
echo "Queue ID $queueID"
grep "$queueID" $tmp
fi
done
rm -f $tmp
# END
... this will give you a list with the various items grouped. The script is
_not_ efficient, but is worth it for occasional use. You'll have to change
the name of the log file or files, and you may have to make other changes to
suit your OS.
-Shel
|
|
|