===============================================================================================
INTRODUCTION
===============================================================================================
Use this script to analyse sendmail logfiles created by the syslog daemon. It was tested with
SuSE Linux 8.2. The generated report is available in HTML and ASCII format. The ASCII format
is useful if this class is included into a script that you run from the command line (e.g.
"perl logcheck.pl").

Please note: By default, webservers like apache etc. don't have permission to read the sendmail
logfile. You could copy the logfile into a password-protected directory within your webserver's
document root, and change the permissions so that your webserver can access this file. Then,
use the LOGCHECK-class with this file. For security reasons, you should not make the sendmail
logfile world-readable.

===============================================================================================
LICENSE
===============================================================================================
This script is freeware for non-commercial use. If you like it, please feel free to make a
donation! However, if you intend to use the script in a commercial project, please donate at
least EUR 4.
You can make a donation on my website: http://www.gerd-tentler.de/tools/smlogcheck_perl/

===============================================================================================
USAGE
===============================================================================================
The LOGCHECK class creates and returns the report in HTML or ASCII format.

Syntax: See examples below.

Variables:

  o maillog        => path to sendmail log
  o format         => format of report ("HTML" or "ASCII")
  o entries        => number of entries in top ranking

  only HTML format:

  o titleFont      => title font family (CSS spec)
  o titleFontSize  => title font size (pixels)
  o titleFontColor => title font color
  o titleBGColor   => title background color
  o titleBorder    => title border (CSS spec)

  o headFont       => table head font family (CSS spec)
  o headFontSize   => table head font size (pixels)
  o headFontColor  => table head font color
  o headBGColor    => table head background color
  o headBorder     => table head border (CSS spec)

  o cellFont       => table cell font family (CSS spec)
  o cellFontSize   => table cell font size (pixels)
  o cellFontColor  => table cell font color
  o cellBGColor    => table cell background color
  o cellBorder     => table cell border (CSS spec)

  o graphFont      => graph font family (CSS spec)
  o graphFontSize  => graph font size (pixels)
  o graphFontColor => graph font color
  o graphBGColor   => graph background color
  o graphBorder    => graph border (CSS spec)

  o barWidth       => graph bar width (pixels)
  o barBorder      => graph bar border (CSS spec)
  o barColor1      => graph bar color 1
  o barColor2      => graph bar color 2

  o labelFont      => graph label font family (CSS spec)
  o labelFontSize  => graph label font size (pixels)
  o labelFontColor => graph label font color
  o labelBGColor   => graph label background color
  o labelBorder    => graph label border (CSS spec)

Example #1:  $log = LOGCHECK->new('/path/to/sendmail.log');
             print $log->report();

Example #2:  $log = LOGCHECK->new('/path/to/sendmail.log');
             $log->{format} = 'ASCII';
             print $log->report();

Example #3:  $log = LOGCHECK->new('/path/to/sendmail.log');
             $log->{filter}{from} = 'user1@isp1';           // sender's e-mail address
             $log->{filter}{to}   = 'user2@isp2';           // recipient's e-mail address
             $log->{filter}{stat} = 'deferred|timeout';     // status
             print $log->report();

The last example shows how you can set filters to tweak your report. The filter values are
treated as regular expressions.

===============================================================================================
Source code available at http://www.gerd-tentler.de/tools/smlogcheck_perl/.
===============================================================================================
