$Id: CHANGELOG,v 1.89 2005/07/07 17:59:41 kevinspicer Exp $ 0.11.00 Updated specfile and install script to include new features Data collection run writes small include files into webserver directory which are included using SSI's from index.html to provide a visual indication of alarm status, a .htaccess file enables server side includes. New Alarm.pm which works out the current alarm status. Update copyright messages Added new threshold configuration file and parsing routines Fix typos in man page Include recipients discarded in count of spams rejected by the MTA. NOTE: this currently works for sendmail only. If anyone wants this in exim/ postfix please email me. Check that data run timeout is defined in config file Minor correction to usage of df to eliminate error messages from df if filesystem specifications are missing from the conf file 0.10.00 Add a link to the index page to subscibe to MailScanner-Announce 0.09.03 Change df command to only look at filesystems we are interested in - this avoids problems caused by dodgy nfs mounts. Ensure state file is written even on timeout, so we only run once each period Fixed serious bug in timeout code, preventing timeouts from working Fixed bug preventing quarantine counts working under some circumstances 0.09.02 No changes to core code, fixes to installation script only. 0.09.01 Better explanation in the config file for MTA Alternative Name Added ability to log to syslog. Make the countfiles routine ignore hidden (dot) files and directories because Suse use a hidden folder in mqueue for something. Tweak the MTA rejected RE for Exim to match better. Quarantine counting now ramps up from the first run by default - this means that it reads at most a days worth of quarantine per run, meaning that the initial run after install or upgrade is unlikely to time out due to an over-ful quarantine. Adapted the quarantine counting so that it now allows multiple quarantines Added --notimeout option to allow a manual run to process the full log file and on the initial run. Also added this to the inital run. Fix ratios to calculate against message count rather than recipient count (thanks to Denis Beauchemin for pointing out my stupid mistake!). Also added configuration option 'I Split Messages' so that ratios can be made to work correctly for those who split messages before processing by MS Change graph title etc for memory not to mention megabytes, as some folks have gigs of RAM ;) Changes to graph config and web page to correct minor niggles in graph titles etc. Make the load average graph show load x 100 on the Y axis. The previous approach of scaling it didn't work with loads over 4! Fix spec file so RPM doesn't overwrite the config files by default Mention README.SNMP in README Two new graphs, Batch Size and Processing Speed 0.09.00 Quarantine now counts messages as well as files. New way of counting files in quarantine to make it quicker. Only todays files are counted, the count of files in other daily directories is cached and assumed not to have changed until the directory disappears. Those that want a truly accurate count can turn quick count off in the config file. Added timeout to data run this should help to protect people from having their system hosed because their quarantine got a bit full and MSMRTG can't count all the files in quarantine in a five minute period. Added descriptions to MRTG graphs (cfg file) - Thanks to Jason Burzenski for writing (and allowing me to use) the original descriptions that these are based on (any errors are of course my additions!) Change spam ratio graph to calculate ratio against total of mail submitted (not just that accepted for processing) Because the spam count includes MTA rejects we must include them in the count of messages. Support multiple queue dirs for incoming and outgoing queues Got rid of duplicate settings for iptraffic in .cfg file Report an error if the SNMP version is neither net nor ucd. Change 'mountpoint' error message to make it even clearer (hopefully) Tweaks to postix RE's to match Postifix cleanup filter messages No longer attempts to restart MailScanner if MailScanner was shutdown using the init script (checks for /var/lock/subsys/MailScanner.off - the location is configurable) New Configuration directive 'MTA Alternative Name' to deal with all those oddly named sendmails out there. Correct Virii to Viruses 0.08.01 Fixed single typo which resulted in incorrect graphs until midnight on the day of upgrading. 0.08.00 Fix two typos in Data.pm Fixes to spec file (man page not a config file!) Permit version numbers of form x.x.x (i.e. strings not numbers) Fixed typo in mailbytes from mailscanner RE. Fix bug checking for /etc/crontab in install script (thanks to Thierry) Fix sendmail re's to cope with Solaris calling it sm-mta, and other solarsisms Fix RE for getting mailbytes from MailScanner Correct bug in install.pl which could lead to incorrect perl path. Specified mode in mkdir call in install.pl so that it works with perl 5.005 Install script now correctly updates mailscanner-mrtg location in cfg file. Removed 'our' directives from modules because they cause problems for versions of perl prior to 5.6 Fixed a few bugs with install script. Allow below to all be the same mount point. Catch when Spool Directory or MailScanner Work Directory are not set to mount points. Allow sendmail regex to also match sendmail-in (Report from Gary Glendown) Added README.SNMP to offer advice on setting up SNMP - error messages now reference this file Catch missing Use SNMP line in config file Make Spool directory configurable Fix bug caused by uninitialised value in iptraffic (only bites when iptraffic fails anyway) Fix a typo in one of the error messages Another uptime fix for FreeBSD from Jan-Peter Koopman Make common error messages more verbose Handle problems with df command more gracefully Added changes by Jan-Peter Koopman, to support FreeBSD (ps command and uptime output) 0.07.02 Fix another net-snmp problem. Should be okay now ;) 0.07.01 Fix important bug affecting net-snmp users and made MSMRTG autodetect net-snmp or ucd-snmp, due to the impact of this being set incorrectly. Thanks to Gerry Doris for reporting the bug. Changed default interfaces to just eth0 (ppp0 was a hangover from testing) 0.07 Minor fix to ensure ratios don't malfunction when counters roll over at midnight Modify stylesheet to get rid of ugly red boxes Change colour scheme to make all four lines visible Change sprintf statements to use %.0f rather than %d Make ratios return zero when no mail has been processed Two new graphs, spam ratio and virus ratio New routine to rescale data files, principally to allow us to get rid of the blockiness for loadavg and mailbytes. These categories will now be rescaled on the first run after upgrade. Changes to the mrtg cfg file hide the scaling from users. Fixed bug with some graphs not rolling over Change title for tmpfsusage graph Tidied up conf file New graph - files in quarantine Added --debug command line flag Added POD documentation Correction to posfix RE to accept postfix/qmgr or postfix/nqmgr and corrected uptime RE;s to accept input from a different version of uptime Thanks to Alberto Sylvester for reporting both the above issues. Small change in behaviour for the various filesystem usage calls, if the target filesystem is not a mount point it now returns 'u'. Further consolidation of functions within Data.pm New install script, primarily for tar.gz users (since the install is now rather more taxing than it used to be). Replace iptraffic graph. Replace all sar functions with SNMP based functions. Add MSMRTG version to state file (so the script can detect and ignore an old state file when upgraded. Also a more flexible approach to data lines, they can now contain arbitrary numbers of values. Value 1 & 2 are already used, value 3 is reserved for future use. Replace most calls to 'die' with calls to 'warn' as dieing is now too disruptive in most cases, Simplify arguments to ProcessFile. Tiny tweak to regex in GetUpTime - was returning too much of the line uder some conditions. Major restructuring! Added 4 modules (State, Data, Config and Debug), all data is now calculated on the first call in each 5 minute period and recorded in the state file. This will support further restructuring to consolidate other functions Fixed typo in title for virus graph in mailscanner-mrtg.cfg . Open /dev/null as STDIN as start of script. Some cron's don't do this which causes some external commands (notably sar) to fail. Thanks to Michael Svendsen for the reporting this issue. Reverted previous change to .include file and removed the Server Side Includes from the mailscanner-mrtg.cfg file instead Removed 'noinfo' for Ethernet Traffic from mailscanner-mrtg.cfg to make it more consistent with other pages Check that uptime and sar exist in the specified locations before calling them Use uptime instead of w | head Make sure mailbytes rounds output off to an integer as some versions of mrtg don't tolerate floats. Thanks to Erik Johnson for the bug report. Correct permissions issues in spec file and prevent apache from using server side includes on the files MRTG produces. (Thanks to Kevin Hanser for pointing both these issues out). Change ps -eo comms to ps -eo args for Solaris. 0.06 Send debug output to STDERR, so you can turn debug on while still collecting data with mrtg. Added second line to CPU utilization to show user percentage as well as total Thanks to Edward L. Hannaford for the suggestion Changed paths in index.html to relative rather than absolute. Added comment for exim users without seperate reject log into conf file. Thanks to Martin Hierling for pointing both those issues out. Sendmail logs rejected messages as 'nrcpts=0' so alter message counting RE to look for ncrpts=[1-9]\d* It seems that folks think that Messages counts messages, whereas it really counts recipients - to reduce confusion added second line to that graph showing actual number of messages, and changed legends. Replaced FixMonth with a single line of perl :) Added Exim support - this required rethinking the different log files that could be accessed. Thanks to Adrian Barker, Eduardo Andre de Santa Helena and Aurelio Costa for their input. Tweaks to InQueue and OutQueue to recurse correctly, only counting files. Postfix support added (Jesse Lang) Fixed uptime on Solaris. Thanks to Travis Zadikem for testing all the Solaris related fixes. Another tweak to ps commands - using output format to only get command which is cleaner than trying to match from different formats. Memory has similar issues to IpTraffic on Solaris so also fails gracefully on that platform now. IpTraffic() now fails gracefully when running on Solaris which doesn't have sar -n (or any obvious alternative). Modified LoadAvg() to get load from w rather than using sar. Its quicker more portable and gives average over last five minutes which is probably more significant than a 5 second snapshot. Modified sar usage in Cpu() to be more portable across different unixes. Altered space in /dev/shm to be the mountpoint of MailScanner work directory. Most people use tmpfs rather than ramdisk, and mountpoints are more portable accross unixes than device names. Added configuration directive to specify mountpoint. Check if running on Solaris, if so alter 'ps ax' to 'ps -ef' Removed 'All your base' references as they are frightening some users who don't get the joke. index.html now validates as valid xhtml1.1 & has an icon to say so. Altered index.html to make graph layout scale to the horizontal window size. Added in option to select alternative MTA's, references to "sendmail" replaced with "mta" (although sendmail maintained as a synonym). sendmail is the default mta if not specified & currently the only supported one. mrtg data paths keep 'sendmail' so as not to break historic data. Added paths for mail log on Mandrake to config file (commented out) Made tmpfsusage return 0 if tmpfs is not being used (rather than failing with an error). Removed all three 'Parse Entire Log' entries from the configuration file as the code that uses them is gone. Wrote functions which combine all of the previous log processing functions, using the state file to store the position reached in the file and running totals for the day. This should make it much faster since it only reads the new portions of the file, and only has to make one pass of the file (if all logs are in the same file). Added State File to config file (this file is used to hold information between runs) Added extra line to Viruses graph to indicate number of actual viruses detected. Also altered title of this graph as it was confusing as much more mail triggers content checks than actually contains a virus. Modified re for sendmail to also match [sendmail] 0.05 Added / to end of inqueue and outqueue paths for symlinks Add graph for space used in /dev/shm/ (Ram Disk) removed "use strict" since it doesn't work in Red Hat 9 Fixed viruses check to look for both "viruses" and "problems" MailBytes now reads in MBytes instead of Bytes Thanks to Denis Beauchemin Change "Restart Threshold" to 1 0.04 Dec 15, 2002 Changed subs to use sar for cross-platform (Solaris???): iptraffic remove Ethernet Device File from mailscanner-mrtg.conf add gauge option to mailscanner-mrtg.cfg loadavg memory Die on even more things if not in $Config array Increase MaxBytes for mailbytes in mailscanner-mrtg.cfg Add the ability to restart MailScanner if processes are low 0.03 Variable at the top of mailscanner-mrtg to point to the config thanks to Kris Stumpner for this tip! Add the MailBytes graph Thanks to Richard Lynch for this tip! Add Server Ethernet Traffic Graph Thanks to Mike Kercher for this tip! Add a file to /etc/cron.d instead of a line to /etc/crontab Thanks to Richard Keech for this tip! Added note to the index page to click on the graphs Change layout and size of index page Using Strict now. Thanks to Stijn Jonker for this tip and patch! Made most regex's case insensitive Thanks to Mike Zanker for this tip! Added debugging code to the GetUpTime() sub Die if various things not in $Config array Fix GetUpTime() to work with Slackware Got really confused and forget what else I added :-) 0.02 Add this changelog :-) Add GPL text to the top of /usr/sbin/mailscanner-mrtg Add descriptions to files in incoming and outgoing queue MRTG pages Change Virii legend from "percentage" to "virii" More comments in /usr/sbin/mailscanner-mrtg Changed the way I match rejects from sendmail was /reject=550/ now /reject=55\d/ thanks to Mike Kercher for this tip! Changed the virus regex to /found (/d+) viruses/ from /found (/d+) viruses in/ thanks to Richard Lynch for this tip! Added some more to the README doc Added a