Previous Article Next Article 郵件記錄分析工具 – postfix + Log + mail-graph
Posted in Mail

郵件記錄分析工具 – postfix + Log + mail-graph

郵件記錄分析工具 – postfix + Log + mail-graph Posted on 2006 年 11 月 14 日Leave a comment

Mail statistics RRDtool frontend for Postfix,利用RRDtool搭配Postfix統計出每日、週、月、年的郵件紀錄,並以圖表顯示郵件的收、送、拒絕、病毒、廣告信等流

1.
cpan2rpm -i Time::HiRes
cpan2rpm -i File::Tail
apt-get install rrdtool

2.
wget http://people.ee.ethz.ch/~dws/software/mailgraph/pub/mailgraph-1.12.tar.gz


tar zxvf mailgraph-1.12.tar.gz
cd mailgraph-1.12

3.
mkdir /var/www/html/mailgraph
cp mailgraph.cgi /var/www/html/mailgraph
chmod 755 /var/www/html/mailgraph/mailgraph.cgi
cp mailgraph.pl /usr/local/bin
chmod 755 /usr/local/bin/mailgraph.pl
cp mailgraph-init /etc/init.d/mailgraph
chmod 755 /etc/init.d/mailgraph

3.
vi /etc/init.d/mailgraph

MAIL_LOG=/var/log/maillog
RRD_DIR=/var/www/html/mailgraph

4.
/etc/init.d/mailgraph start

5.
ps axu|grep mail

/usr/bin/perl -w /usr/local/bin/mailgraph.pl -l /var/log/maillog -d –daemon-pid=/var/run/mailgraph.pid –daemon-rrd=/var/www/html/mailgraph

6.
vi /etc/httpd/conf/httpd.conf

ScriptAlias /mailgraph "/var/www/html/mailgraph/"

service httpd graceful

7.
http://ip/mailgraph/mailgraph.cgi

Q1. Can't locate RRDs.pm in @INC (@INC contains:
A1. apt-get install perl-rrdtool

Q2. Can't locate File/Tail.pm in @INC (@INC contains:
A2. cpan2rpm -i File::Tail

 

 

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *