Installing Sendmail Analyzer on RHEL/CentOS
The Sendmail Analyzer can be useful for visualizing your Sendmail/Postfix log. The commands below can be copy-pasted as root on default installations of RHEL and CentOS 5/6 with default Postfix and httpd. If your configuration is customized, just use these commands as a guide and make adjustments as needed.
Take note of the “Allow from all” directive in the httpd.conf configuration. Depending on your network security configuration, you may restrict this to specific subnets (i.e. “Allow from 198.162.1.0/24”.
cd /tmp
yum -y install perl-GD
yum -y install perl-GD-Graph3d
wget "http://downloads.sourceforge.net/project/sa-report/sa-report/8.7/sendmailanalyzer-8.7.tar.gz"
tar xvfz sendmailanalyzer-8.7.tar.gz
cd sendmailanalyzer-8.7/
perl Makefile.PL
make && make install
/usr/local/sendmailanalyzer/sendmailanalyzer -f
/usr/local/sendmailanalyzer/sa_cache
cat << EOF >> /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
</Directory>
EOF
service httpd restart
cd /tmp/sendmailanalyzer-8.7/start_scripts
chown root:root *
chmod 755 *
cp -p sendmailanalyzer /etc/init.d/sendmailanalyzer
chkconfig --add sendmailanalyzer
service sendmailanalyzer restart
echo << EOF >> /var/spool/cron/root
#
# SendmailAnalyzer log reporting daily cache
0 */1 * * * /usr/local/sendmailanalyzer/sa_cache > /dev/null 2>&1
#
EOF
service crond restart
One Comment »
1 Pingbacks »
-
[…] Linkovi sa uputstvom za instalaciju : link1 […]



I would like to add a 2nd way to install sendmailanalyzer on
RHEL/CentOS via RPM package.
yum install rpm-build
wget “http://downloads.sourceforge.net/project/sa-report/sa-report/8.7/sendmailanalyzer-8.7.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsa-report%2F&ts=1363055890&use_mirror=iweb”
mkdir -p ~/rpmbuild/{SOURCES,SPECS}
tar xf sendmailanalyzer-8.7.tar.gz -C ~/rpmbuild/SPECS –strip-components=3 sendmailanalyzer-8.7/packaging/RPM/sendmailanalyzer.spec
cd ~/rpmbuild/SPECS/
rpmbuild -bb sendmailanalyzer.spec
yum localinstall ../RPMS/noarch/sendmailanalyzer-8.7-1.el6.noarch.rpm
Uncomment the following line in /etc/cron.d/sendmailanalyzer
0 1 * * * root /usr/bin/sa_cache > /dev/null 2>&1
Uncomment /etc/httpd/conf.d/sendmailanalyzer.conf and add place from where you wish to acces the reports
Allow from
service httpd reload
service sendmailanalyzer start
chkconfig sendmailanalyzer on
Ihope this helps someone, like your recipe helped me.
Regards,
Aas.