TPmail text output.

Mail package TPmail for Unix systems

Language

[eng]  [rus]


Home

Documentation

Support

News

Resources

Contacts


Module sma_stat. Description and work.

Contents

Module sma_stat
Features list of sma_stat
Options of module sma_stat
Configuration file for sma_stat
Usage examples
Sample of configuration file
Reports samples



Module sma_stat is provided a mail traffic statistics as reports using HTML or ASCII formats. The program sma_stat reads as input the logs of sendmail (usually this is maillog), and then, using a given configuration file, builds the reports files. The reports can be done for many servers (it is possible to collect logs of sendmail for these servers into one combined log). It is possible to a various configuration files to build a wanted reports. When a mail traffic volume is enough big then a usage of all options is given the waste of the disk space. For example, the reports with all options are processed about 20000 messages/connects will be wasted the disk space upto 100 Megabytes.


Module sma_stat can provided the following statistics about mail traffic:

- common summary info for the time interval (messages/connects, traffic volume and others.);
- common summary info for week period (messages/connects, traffic volume and others);
- summary info for the time interval for hosts (relays);
- summary info for the time interval for recipients (abonents);
- detail information for the time interval for domains;
- detail information for the time interval for envelopes messages;
- detail information for the time interval for relays;
- detail information for the time interval for milter rejects;
- detail information for the time interval for ruleset rejects;
- additional info for the time interval as unknown users and others;
- support of links to other reports as messages archive, anti-spam filter statistics ΣΤΑΤΙΣΤΙΛΑ and other specialized reports;


A program sma_stat is supported the following options of command line
(they is also described in the standard manual man for sma_stat):


OptionPurpose
-hshort help
-aformat output as ASCII (default=HTML)
-gprint general information (default=no)
-qprint domains information for relays (default=no)
-uprint unknown messages list of sendmail (default=no)
-zprint unknown user messages list (default=no)
-oprint other messages list of sendmail (default=no)
-nprint domains information for envelopes (default=no)
-mprint milter rejects information (default=no)
-sprint ruleset rejects information (default=no)
-eprint envelope information (default=no)
-iprint index html file (default=no)
-rprint relays information (default=no)
-tprint TLS/SSL messages list of sendmail (default=no)
-jprint non-active clients messages list (default=no)
-xprint recipients summary information (default=no)
-yprint relays summary information (default=no)
-wprint weekly summary information (default=no)
-kprint messages/rejects statistics in plain ASCII (default=no)
-c configconfiguration file name (default=/usr/local/etc/sma_stat.conf)
-vverbose
-penable time profiling
-Pdisable mergesort
-B outdiroutput base catalog (default=current catalog)
-L logfilelogging file (default=/var/log/sma_stat.log)
-f infileinput file (logfile of sendmail)
-G outfileoutput file of general info (option -g)
-Q outfileoutput file of domains info for relays (option -q)
-N outfileoutput file of domains info for envelopes (option -n)
-R outfileoutput file of relays info (option -r)
-E outfileoutput file of envelope info (option -e)
-M outfileoutput file of milter reject info (option -m)
-S outfileoutput file of sendmail ruleset rejects info (option -s)
-O outfileoutput file of all other messages of sendmail (option -o)
-T outfileoutput file of all TLS/SSL messages of sendmail (option -t)
-J outfileoutput file of all non-active clients messages (option -j)
-U outfileoutput file of all unknown messages of sendmail (option -u)
-X outfileoutput file of summary info for recipients (otion -x)
-Y outfileoutput file of summary info for relays (option -y)
-Z outfileoutput file of all unknown user messages (option -z)
-I outfilemain HTML output file (option -i),(default=index.html)
-K outfileoutput file of messages/rejects statistics (option -k)
-l licensekeyuser license key file (default=/usr/local/etc/tpmail.key)
-d leveldebugging level (default=0)
-Vprint version


The configuration file for sma_stat is the almost identical the command line options with these exceiptions:
1) can be done the split of large HTML files into more small pieces;
2) can be done the links to reports from other programs;

It is recommended to use the configuration file.

The module sma_stat has a ready scripts to build the statistics reports:
sma_stat_current.sh, sma_stat_daily.sh, weekly_mail_report.sh


Samples usage.

Sample 1.
Build only the common statistics in the text format.
# /usr/local/bin/sma_stat -f /var/log/maillog -ag -G general.asc

Sample 2.
Build all the statistics in the HTML format and place all reports on the Web server. Assume that all neccessary options are present in the configuration file.
# /usr/local/bin/sma_stat -B /usr/local/www/data/mailstat/current -f /var/log/maillog



Configuration file sample (it can be found in TPmail distribution): sma_stat.conf.sample


Reports samples.

A weekly report: weekly_report.html
A start page of reports: index.html
A start page of common summary info per day: general.html
A page of common summary info for rejects per day: milter_rejects_by_reason_count.html
A page of hosts distributiuon per country for day (sorted by name):
relay_domains_by_name_level_1.html
A page of accepted messages per day (sorted by messages number): envelope_pairs_by_count.html
A page of rejects per day (sorted by name): milter_rejects_by_recipient_name.html



Valid HTML 3.2! Copyright © 2007 Dmitry Stefankov Last modified: $Date: 2008-01-04 19:14:47+03 $ Powered by FreeBSD. Powered by Apache. Powered by OpenSSL.