Tuesday 19 August 2014

SendmailAnalyzer : Mail Log Analyzer

SendmailAnalyzer : E-Mail Log Analyzer


SendmailAnalyzer as is name suggest is a free Sendmail/Postfix log analyzer. It process maillog files and generate dynamic statistics in HTML and graphical output. 

The reports are generated in real time so that it let you know at any moment what is going on your mail servers. It use time (hour, day, month and year views) and cross-linked navigation for easy use.
SendmailAnalyzer is easy to install and highly configurable tool. It also support report for all the major milter or sendmail filters like SpamAssassin, MailScanner, Clamav, Amavis, RBL check, J-ChkMail, etc. SendmailAnalyzer is really helpful for IT reporting.
SendmailAnalyzer can be run on a home dedicated mail server, on multiple enterprise mail servers and on ISP mail servers for free.



This is the most advanced and complete statistics tool dedicated to the great Sendmail MTA & Postfix. It's goal is not to support any kind of MTA or other log format but only being a full featured tool for Sendmail/Postfix users and administrators. 



Features of SendmailAnalyzer




Screenshots :-










Installation of SendmailAnalyzer
 
----------------------------------------------------------------------------------------
1) Stop unwanted Services or settings
----------------------------------------------------------------------------------------
# /etc/init.d/NetworkManager stop
# chkconfig NetworkManager off
Note: Make sure you have configured Network i.e. (IP Address/Netmask/Gateway/DNS)

# vi /etc/sysconfig/selinux
SELINUX=disabled


----------------------------------------------------------------------------------------
2) Open Necessary Ports in iptables
----------------------------------------------------------------------------------------
[root@server ~]#vi /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT


----------------------------------------------------------------------------------------
3) Install Require Packages and dependencies and verify

----------------------------------------------------------------------------------------

[root@server ~]#yum install perl-ExtUtils-MakeMaker perl-GD-Graph perl-GD-Graph3d make gd libpng
[root@server ~]#yum install httpd
[root@server ~]#yum install make gcc automake zlib-devel bison cmake libtool wget gcc-c++ unzip ncurses-devel openssl-devel pcre-devel libxml2-devel curl-devel gd-devel libxslt-devel
[root@server ~]#yum -y install perl-CPAN


----------------------------------------------------------------------------------------
4) Install Following Perl Module with CPan
----------------------------------------------------------------------------------------

[root@server ~]#cpan
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.


cpan[1]> install MIME::Base64
cpan[1]> install MIME::QuotedPrint
cpan[1]> install GD::Graph
cpan[1]> install GD::TextUtil
cpan[1]> install GD::Graph::bars3d



----------------------------------------------------------------------------------------
4) Download SendmailAnalyzer Packages Compile
----------------------------------------------------------------------------------------

[root@server ~]#wget http://downloads.sourceforge.net/project/sa-report/sa-report/9.0/sendmailanalyzer-9.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsa-report%2F&ts=1408367748&use_mirror=softlayer-sng
[root@server ~]#tar -zxvf sendmailanalyzer-9.0.tar.gz
[root@server ~]#cd sendmailanalyzer-9.0
[root@server ~]#perl Makefile.PL
[root@server ~]#make && make install


----------------------------------------------------------------------------------------
5) Start SendmailAnalyzer daemon with:
----------------------------------------------------------------------------------------

[root@server ~]#/usr/local/sendmailanalyzer/sendmailanalyzer -f




----------------------------------------------------------------------------------------
6) Modify your httpd.conf to allow access to CGI scripts like follow: & Restart Apache
----------------------------------------------------------------------------------------

[root@server ~]#vi /etc/httpd/conf/httpd.conf

        Alias /sareport /usr/local/sendmailanalyzer/www

        <Directory /usr/local/sendmailanalyzer/www>
            Options ExecCGI
            AddHandler cgi-script .cgi
            DirectoryIndex sa_report.cgi
            Order deny,allow
            Deny from all
            Allow from all
            Allow from ::1
        </Directory>


[root@server ~]#/etc/init.d/httpd restart



----------------------------------------------------------------------------------------
7) Browse SendmailAnalyzer to see the Report
----------------------------------------------------------------------------------------
   
Browse to http://mail.deva.com/sareport/ OR http://IP-OF-Server/sareport/ to ensure that things are working properly.


----------------------------------------------------------------------------------------
8) Setup a cronjob to run sa_cache and restart SendmailAnalyzer daemon after maillog logrotate as follow:
----------------------------------------------------------------------------------------
[root@server ~]#crontab -e

# SendmailAnalyzer log reporting daily cache
0 1 * * * /usr/local/sendmailanalyzer/sa_cache > /dev/null 2>&1
# On huge MTA you may want to have five minutes caching
#*/5 * * * * /usr/local/sendmailanalyzer/sa_cache -a > /dev/null 2>&1













[root@mail ~]# /etc/init.d/crond restart
Stopping crond:      [  OK  ]
Starting crond:      [  OK  ]


Ref Link:http://sareport.darold.net/install.html

 
                    -------------------------

                                                            END
                    -------------------------

No comments:

Post a Comment