diff -Nur -x '*.orig' -x '*.rej' smeserver-mailstats-0.0.2/root/usr/bin/spamfilter-stats-7.pl mezzanine_patched_smeserver-mailstats-0.0.2/root/usr/bin/spamfilter-stats-7.pl --- smeserver-mailstats-0.0.2/root/usr/bin/spamfilter-stats-7.pl 2007-10-01 10:57:45.000000000 -0400 +++ mezzanine_patched_smeserver-mailstats-0.0.2/root/usr/bin/spamfilter-stats-7.pl 2007-10-01 10:57:00.000000000 -0400 @@ -65,6 +65,7 @@ # 0.6.9 - bjr - Catch webmail and mailman # 0.6.10 - bjr - Refine Webmail identification # 0.6.11 - bjr - Fix Webmail identification +# 0.6.12 - cfc - Fixed issue with previous day for the first day of the month. Initialized an array with empty values so that the script wouldn't issue warning messages when not all the fields were used. # # # @@ -96,15 +97,12 @@ #Configuration section my %opt = (); -$opt{'version'} = '0.6.11'; # please update at each change. +$opt{'version'} = '0.6.12'; # please update at each change. $opt{'debug'} = 0; # guess what ? $opt{'sendmail'} = '/usr/sbin/sendmail'; # Path to sendmail stub $opt{'from'} = 'spamfilter-stats'; # Who is the mail from $opt{'end'} = `date --iso-8601`; # midnight today -my $yesterday = $opt{ 'end' }; -$yesterday =~ s/\-//g ; -$yesterday--; -$opt{'start'} = `date --iso-8601 -d $yesterday`; # midnight yesterday +$opt{'start'} = UnixDate(DateCalc($opt{'end'},"- 24hours"),"%Y-%m-%d"); $opt{'mail'} = "admin"; $opt{'timezone'} = `date +%z`; Date_Init("TZ=$opt{'timezone'}"); @@ -165,7 +163,7 @@ my $rblnotset = ' '; my $FS = "\t"; # field separator used by logterse plugin -my %log_items = (); +my %log_items = ("","","","","","","",""); my $score; my %timestamp_items = (); my $localflag = 0; #indicate if current email is local or not @@ -828,4 +826,4 @@ $byrcptdomain{ $currentrcptdomain{ $proc } }{ 'deny' }++ ; $currentrcptdomain{ $proc } = '' ; } -} \ No newline at end of file +}