Jump to content

Main Page/postfix mail statistics: Difference between revisions

From TetraWiki
No edit summary
No edit summary
 
Line 1: Line 1:
[[category:Implementation]]
[[category:Tetra Clients]]
[[category:BLK Hospital]]
[[category:BLK Hospital]]



Latest revision as of 03:29, 6 September 2013


Postfix mail statistics via log analyzer (on Debian platform )


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 :[edit]

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/sbin/ . Make sure the permissions are 700 for security.

Step 3: get statistics out of logs :

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


process 2:[edit]

install pflogsumm

apt-get install pflogsumm

get statistics out of logs :

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


INSTALL A NEW CRONTAB FOR GETTING REGULAR UPDATE OF EACH DAYS MAIL STATISTICS[edit]

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