Giter Club home page Giter Club logo

mailgraph's Introduction

      -----------------------------------------------------
      mailgraph - a RRDtool frontend for Postfix Statistics
      by David Schweikert <[email protected]>
      -----------------------------------------------------

mailgraph is a very simple mail statistics RRDtool frontend for Postfix
that produces daily, weekly, monthly and yearly graphs of received/sent 
and bounced/rejected mail (SMTP traffic).

Get it from:


         http://mailgraph.schweikert.ch/
	 ===============================


Required Modules
----------------

- rrdtool and it's perl module (RRDs)
  -> http://oss.oetiker.ch/rrdtool/

- File::Tail (which requires Time::HiRes)
  -> get it from CPAN

Note that several Linux distributions will already have these modules as RPMs.


Usage
-----

mailgraph is made of two scripts:

- mailgraph.pl

  This script does parse syslog and updates the RRD database (mailgraph.rrd)
  in the current directory.

  It is a deamon and will monitor your log-file for changes.
  DO NOT RUN IT WITH CRON!

  usage: mailgraph.pl [*options*]
  
  -h, --help         display this help and exit
  -v, --verbose      be verbose about what you do
  -V, --version      output version information and exit
  -c, --cat          causes the logfile to be only read and not monitored
  -l, --logfile f    monitor logfile f instead of /var/log/syslog
  -y, --year         starting year of the log file (default: current year)
      --host=HOST    use only entries for HOST (regexp) in syslog
  -d, --daemon       start in the background
  --daemon-pid=FILE  write PID to FILE instead of /var/run/mailgraph.pid
  --daemon-rrd=DIR   write RRDs to DIR instead of /var/log
  --daemon-log=FILE  write verbose-log to FILE instead of /var/log/mailgraph.log
  --ignore-localhost ignore mail to/from localhost (used for virus scanner)\n";
  
  If -c is not specified, mailgraph will monitor logfile for Postfix log entries
  in logfile (/var/log/syslog unless -l is specified).

- mailgraph.cgi

  This is a CGI script that does generate graphics from the RRD database.

  You have probably to change $rrd to point to where the RRD database is stored.

  Note that "Bounced", "Viruses", and "Spam" are stacked one on another in the
  graph, whereas "Rejected" is a line.


Installation
------------

See the file mailgraph-init for an example init script that you can use to
start mailgraph at system boot.

You need to put mailgraph.cgi on somewhere accessible though a web-server, it
needs to be executeable and the web-server needs to execute it as a CGI.


License
-------

mailgraph is released under the GPL license. See the file COPYING included in
the distribution for details.

mailgraph's People

Contributors

schweikert avatar x-way avatar sbidy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.