Jump to content

Main Page/postfix mail statistics: Difference between revisions

From TetraWiki
Hemant (talk | contribs)
No edit summary
Hemant (talk | contribs)
No edit summary
Line 28: Line 28:


install pflogsumm  
install pflogsumm  
apt-get install pflogsumm


get statistics out of logs :
get statistics out of logs :

Revision as of 11:09, 5 September 2013

Postfix mail statistics via log analyzer


Pflogsumm is a log analyzer for Postfix. The generated report can show you patterns in email traffic so you can better determine mail server abusers or if your mail server needs to be upgraded.

Statistics can be very helpful in showing, for example, when most of your mail is sent or received or if that one mail user is sending out more than their fair share of mail.

Pflogsumm is a single perl file and its only dependancies are perl, the perl module Date::Calc (which is probably already installed on your system) and the proper location of a Postfix log file.


There are 2 ways to install pflogsumm :


process 1 :

Step 1: To get started you first need to download the pflogsumm.pl perl script. from the link :

   jimsun.linxnet.com/downloads/pflogsumm-1.1.0.tar.gz

Step 2: Extract the files from the tar ball and put _only_ the perl script pflogsumm.pl into /usr/local/bin/ . Make sure the permissions are 700 for security.

Step 3: get statistics out of logs :

  /usr/local/bin/pflogsumm -u 5 -h 5 -d today /var/log/mail.log 


process 2:

install pflogsumm

apt-get install pflogsumm

get statistics out of logs :

  /usr/local/bin/pflogsumm -u 5 -h 5 -d today /var/log/mail.log 

== INSTALL A NEW CRONTAB FOR GETTING REGULAR UPDATE OF EACH DAYS MAIL STATISTICS

==

59 23 * * * /usr/local/bin/pflogsumm -u 5 -h 5 -d today /var/log/mail.log | mail -s "pflogsumm report " root@localhost