SendmailAnalyzer 2.1 review

Download
by rbytes.net on

Sendmail Analyzer is a perl script reporting full HTML and graph sendmail usage reports

License: GPL (GNU General Public License)
File size: 22K
Developer: Gilles Darold
0 stars award from rbytes.net

Sendmail Analyzer is a perl script reporting full HTML and graph sendmail usage reports. It reports statistics on inbound, outbound and largest messages, senders and recipients, relays, domains, and complete mailboxes usage if your country law allow it.

Statistics are generated per hour, day, month and year. Graphs are in PNG format.

Requirements:
This script has been developped with perl version 5.6 and should run without problem with perl 5.6.x and above versions. Some perl modules are required for mail addresses decoding:

MIME::Base64
MIME::QuotePrint

It also used the following perl modules to render graph output:

GD::Graph;
GD::Graph::bars3d;

Configuration:

The syntaxe of the configuration file consist as a variable name with an associated value separated by an equal (=) character. Here is the description of the available configuration directives.

hostname = FQDN of localhost name
Fully qualified domain name of localhost. This is used to find local message delivery.
Must be set.

gateway = FQDN hostname of the mail gateway/hub
Name of the host acting as a mail gateway or mail hub where all incoming messagei come from. This is used to find external/internal source or destination. Must be set.

relay = FQDN hostname of the mailboxes server
Name of the host where all accepted incoming message will be relayed. This is used to find external/internal source or destination. Must be set.

domain = List of local delivery Internet domain
List of Internet domain separated by space that can be considered as local domain delivery.

logfile = /var/log/maillog
Sendmail log file to parse.

mta = sendmail
Name of the MTA as is written in the syslog output. Default is 'sendmail'

antivir = MailScanner
Name of the Antivir program logged into the maillog file.

antispam = MailScanner
Name of the Anti Spam program logged into the maillog file.

spam_pattern = Spam Actions: message %ID%
Regexp pattern matching to find spam detection line from the anti spam program. The %ID% should be placed a the right place of the sendmail internal message id. This id must be found. This pattern is the default for Mailscanner.

virus_pattern = Infected message %ID%
Regexp pattern matching to find virus detection line from the antivir program. The %ID% should be placed a the right place of the sendmail internal message id. This id must be found. This pattern is the default for Mailscanner.

top = 100
Number of top data that should be display in the relay, sender and recipient statistics.

aliases = /etc/mail/aliases
Path to the main aliases file. This is used to recognize lines of alias database rebuilt.

sizelimit = 5000000
This is used to set the size limit in bytes of the largest messages that should be reported. Any message with size upper or equal to this size will be shown in the "Largest transfert"
statistics.

rcptlimit = 20
This is used to set the largest recipient number for a message that should be reported. Any message with recipient number upper or equal to this number will be shown in the "largest" statistics.

output = /var/www/htdocs/SendmailAnalyser
Path to the HTML output directory. Should be browsable with your favorite navigator and must exists.

logo = /barorng.gif
URI of the sendmail logo.

security = user | domain
Security mode. Can be 'user' or 'domain'. If law in your country doesn't allow user report, set this variable to 'domain'.

quiet = 1 | 0
Set it to something other than 0 to disable any console output.

detail = 1 | 0
Set it to something other than 0 to allow very detailled report on who send where and who recieved from. Slow down parsing and use a lot of disk space.

lang = /usr/local/SendmailAnalyzer/lang/en_US.txt
Set it to the required translation file if available. Feel free to send me other translation files there will be include in the next release.

delete_domain = 1 | 0
This should be set to 1 when this script is running on a host where domain part of the destination mailboxes is rewritten with the relay hostname. This is a workaround for user details when domain part in the from and to part of an internal user is not the same du to this rewritting.

size_unit = Byte
Set the size units: Byte, KByte or MByte. Default is Byte.

SendmailAnalyzer 2.1 keywords