Jump to content

Main Page/postfix mail statistics

From TetraWiki
Revision as of 11:05, 5 September 2013 by Hemant (talk | contribs) (Created page with "'''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 determi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 bandwidth limitations, 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.

   Download pflogsumm.pl here.

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

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