1 |
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 |
2 |
--- smeserver-mailstats-0.0.2/root/usr/bin/spamfilter-stats-7.pl 2007-10-01 10:57:45.000000000 -0400 |
3 |
+++ mezzanine_patched_smeserver-mailstats-0.0.2/root/usr/bin/spamfilter-stats-7.pl 2007-10-01 10:57:00.000000000 -0400 |
4 |
@@ -65,6 +65,7 @@ |
5 |
# 0.6.9 - bjr - Catch webmail and mailman |
6 |
# 0.6.10 - bjr - Refine Webmail identification |
7 |
# 0.6.11 - bjr - Fix Webmail identification |
8 |
+# 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. |
9 |
# |
10 |
# |
11 |
# |
12 |
@@ -96,15 +97,12 @@ |
13 |
#Configuration section |
14 |
my %opt = (); |
15 |
|
16 |
-$opt{'version'} = '0.6.11'; # please update at each change. |
17 |
+$opt{'version'} = '0.6.12'; # please update at each change. |
18 |
$opt{'debug'} = 0; # guess what ? |
19 |
$opt{'sendmail'} = '/usr/sbin/sendmail'; # Path to sendmail stub |
20 |
$opt{'from'} = 'spamfilter-stats'; # Who is the mail from |
21 |
$opt{'end'} = `date --iso-8601`; # midnight today |
22 |
-my $yesterday = $opt{ 'end' }; |
23 |
-$yesterday =~ s/\-//g ; |
24 |
-$yesterday--; |
25 |
-$opt{'start'} = `date --iso-8601 -d $yesterday`; # midnight yesterday |
26 |
+$opt{'start'} = UnixDate(DateCalc($opt{'end'},"- 24hours"),"%Y-%m-%d"); |
27 |
$opt{'mail'} = "admin"; |
28 |
$opt{'timezone'} = `date +%z`; |
29 |
Date_Init("TZ=$opt{'timezone'}"); |
30 |
@@ -165,7 +163,7 @@ |
31 |
my $rblnotset = ' '; |
32 |
|
33 |
my $FS = "\t"; # field separator used by logterse plugin |
34 |
-my %log_items = (); |
35 |
+my %log_items = ("","","","","","","",""); |
36 |
my $score; |
37 |
my %timestamp_items = (); |
38 |
my $localflag = 0; #indicate if current email is local or not |
39 |
@@ -828,4 +826,4 @@ |
40 |
$byrcptdomain{ $currentrcptdomain{ $proc } }{ 'deny' }++ ; |
41 |
$currentrcptdomain{ $proc } = '' ; |
42 |
} |
43 |
-} |
44 |
\ No newline at end of file |
45 |
+} |