Postfixログを解析 pflogsumm
[root@falcon21 ~]# yum -y install postfix-pflogsumm
pflogsumm実行スクリプト作成
[root@falcon21 ~]# vi pflogsumm_report
#!/bin/bash
MAILLOG=`mktemp`
for log in `ls /var/log/maillog-*|sort`
do
done
cat /var/log/maillog >> $MAILLOG
REPORT=`mktemp`
pflogsumm --problems_first --verbose_msg_detail --mailq -d yesterday $MAILLOG > $REPORT
cat $REPORT | mail -s "`head -1 $REPORT` in `uname -n`" postmaster
rm -f $MAILLOG $REPORT
---------------------
[root@falcon21 ~]# chmod 700 pflogsumm_report
[root@falcon21 ~]# ./pflogsumm_report
----------------------------
pflogsumm定期自動実行設定
[root@falcon21 ~]# mv pflogsumm_report /etc/cron.daily/
***********************************************************************