123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- # yasma.pl
- # (Yet Another Sendmail Log Analyzer)
- #
- # Copyright (c) 2006 by Peter_Siegrist(SystemLoesungen) (PSS@ZweierNet.ch)
- #
- # All Rights reserved.
- # This program is free software; you can redistribute it and/or
- # modify it under the terms of the GNU General Public License as
- # published by the Free Software Foundation.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- README
- ------
- BE CAREFUL BEFORE YOU USE THIS SOTWARE !
- In some Countries it might be illegal to read mail logs and produce mail log summaries.
- Or, at least, it is illegal to view names of users you run a mail service for it.
- If so, make sure that you run Yasma always with command line option (-u) or configuration file
- parameter "HIDE_USERS = TRUE".
- Thanks to Sébastien Aperghis-Tramoni
- ====================================
- Yasma uses a slightly modified Parse::Syslog::Mail perl module
- from Sébastien Aperghis-Tramoni <sebastien@aperghis.net>.
- Therefore you dont have to install this module, its delivered within the Yasma package.
- Installation:
- =============
- Download the archive, unpack it to a directory of your choice (ie. /usr/local/) with
- - tar xvfz yasma-0.91.tar.gz
- tar will create a new directory (ie. yasma-0.91/) with all necessary files.
- You can rename this directory if you like so,
- or, for updates just copy the perl script to your old yasma location and check the
- differences of the config file.
- Go to this directory an edit the 'yasma.conf' file suited to your environment and fancy.
- The configuration variables are explained within this file.
- Run it:
- =======
- The 'yasma.pl' programm have to run within the directory where yasma.conf resides
- and must have read access to logfiles and write access to the folder
- where the html output file will be written.
- To run the program, just type:
- #> yasma.pl [-c config-file] [-f output-file] [-u] /path_to_logfiles/logfile[*]
- Yasma can read single or multiple logfiles who can be plain, gzipped (.gz), compressed (.Z) or mixed.
- ! Be sure the program cannot be started from an insecure place or user !
- Command line options:
- ---------------------
- -c config full name of yasma.conf config-file
- -u dont show user names of mail addresses
- -f file print the report to this file. Else output will sent to file defined in configfile.
- Examples:
- =========
- #> yasma.pl -f /opt/httpd/htdocs/report.html /var/log/mail*
- this will read all logs beginning with mail* and puts the html report to the file specified by the -f option.
- #> yasma.pl /var/log/mail
- this will read the logfile /var/log/mail and puts the html report to file you have defined in 'yasma.conf'
- #> yasma.pl -u /var/log/mail
- the same as above but do not show user part of addresses.
- GeoIP Database:
- ===============
- For installing and upgrading GeoIP-database you should do the following:
- 1. Download GeoIP-database 'GeoIP.dat.gz' from http://www.maxmind.com/download/geoip/database/GeoLiteCountry/
- 2. unpack the GeoIP.dat to the place you defined in yasma.conf (param "geoip_dbase")
- System Requirements:
- ====================
- Software:
- * Linux/Unix System mit Perl >= 5.6 und Web-Server
- * Perlmodule CGI, IO::Handle, File::Basename, Parse::Syslog and POSIX from CPAN
- * Optional Geo::IP::PurePerl and its GeoIP Database
- Changes
- =======
- 0.94: new comandline parameter -c configfile
- allow timestamps in the future in mailfile
- 0.95: fix a senseless isa() call when no logfile is given.
- 0.96: give Parse::Syslog::Mail a year attribute if we can grep it from the filename.
- Useful for leap years.
-
- ToDo:
- =====
- Yasma is very unfinished.
- Yasma is tested just for sendmail logfiles. Other mailsystems should be added in future.
- Therefor I'm looking for logfiles from other mailsystems as well as strange sendmail logfiles.
- Other:
- ======
- I would be pleased about suggestions, experience or problems.
- Please send any mails regarding yasma to yasma@ZweierNet.ch
- Copyright und Lizenz:
- =====================
- Copyright © 2006 by Peter_Siegrist(SystemLoesungen) <pss@zweiernet.ch>.
- This program is free software under the terms of the GNU General Public License.
|