About / News Features Download Documentation Support Contact ScreenShots Help support SendmailAnalyzer!
|
Installation guideRequirementSendmailAnalyzer can work in any platform where Sendmail and Perl could run. What you need is a modern Perl distribution 5.8.x or more is good but older version should also work. You need the following Perl modules. If they are not yet include in your OS distribution you can always find them at http://search.cpan.org/ MIME::Base64; MIME::QuotedPrint; Since 9.0 all charts are created on client side using the flotr2 Javascript library, so you don't need any other requirement than a modern browser. Older release < 9.0Older release do not use any Javascript Graph library and graphs are drawn using the libgd library. You need additional library and Perl modules to have ti works. GD GD::Graph GD::TextUtil GD::Graph::bars3d; Or if you have Internet access from your server, you can execute the following command to install GD::Graph::bars3d and all its dependencies. perl -MCPAN -e 'install GD::Graph::bars3d' The graph output are generated using the libgd and libpng. You can get them at the following places:
http://www.libgd.org/ http://www.libpng.org/ InstallationGeneric installHere is the generic installation steps, but if you want you can create and install your own distribution package, see "Package install" bellow. 1) Unpack the distribution tarball in the desired location as follow: tar xzf sendmailanalyzer-x.x.tar.gz cd sendmailanalyzer-x.x/ perl Makefile.PL make && make install 2) Follow the instruction given at the end of install. With this default install everything will be installed under /usr/local/sendmailanalyzer. 3) Edit sendmailanalyzer.conf file to customize your SendmailAnalyzer reports. See the configuration file and CONFIGURATION section bellow for usage. Post installAt the end of the install you will be warn about the actions to perform to terminate the installation. For example with a default installation: 1. Start SendmailAnalyzer daemon with: /usr/local/sendmailanalyzer/sendmailanalyzer -f or use one of the starters script provided in the start_scripts/ directory. 2. Modify your httpd.conf to allow access to CGI scripts like follow: 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 127.0.0.1 Allow from ::1 # Allow from .example.com </Directory> 3. If necessary, give additional host access to SendmailAnalyzer in httpd.conf. Restart and ensure that httpd is running. 4. Browse to http://mta.host.dom/sareport/ to ensure that things are working properly. 5. Setup a cronjob to run sa_cache and restart SendmailAnalyzer daemon after maillog logrotate as follow: # 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 6. Add an entry in /etc/logrotate.d/syslog to restart SendmailAnalyzer when maillog is rotated or create a cron job. For example: /var/log/cron /var/log/debug /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler /var/log/syslog { sharedscripts postrotate /bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true /PATH_TO/rc.sendmailanalyzer restart >/dev/null 2>&1 || true # or /etc/rc.d/init.d/sendmailanalyzer restart >/dev/null 2>&1 || true endscript } Package installIn the packaging/ directory you will find all scripts and file to generate binary RPM, Slackware and Debian package. See README in this directory. Custom installYou can create your fully customized SendmailAnalyzer installation by using the Makefile.PL Perl script. Here is a sample: perl Makefile.PL \ LOGFILE=/var/log/maillog \ BINDIR=/usr/bin \ CONFDIR=/etc \ PIDDIR=/var/run \ BASEDIR=/var/lib/sendmailanalyzer \ HTMLDIR=/var/www/sendmailanalyzer \ MANDIR=/usr/man/man3 \ DOCDIR=/usr/share/doc/sendmailanalyzer If you want to build a distro package, there are two other options that you may use. The QUIET option is to tell to Makefile.PL to not show the default post install README. The DESTDIR is to create and install all files in a package build base directory. For example for Fedora RPM, thing may look like that: # Make Perl and SendmailAnalyzer distrib files %{__perl} Makefile.PL \ INSTALLDIRS=vendor \ QUIET=1 \ LOGFILE=/var/log/maillog \ BINDIR=%{_bindir} \ CONFDIR=%{_sysconfdir} \ PIDDIR=%{rundir} \ BASEDIR=%{_localstatedir}/lib/%{uname} \ HTMLDIR=%{webdir} \ MANDIR=%{_mandir}/man3 \ DOCDIR=%{_docdir}/%{uname}-%{version} \ DESTDIR=%{buildroot} < /dev/null See spec file in packaging/RPM for full RPM build script. |
---|
Copyright (c) 2002-2019 Gilles Darold - All rights reserved. (GPL v3).