/[smecontribs]/rpms/smeserver-mailstats/contribs10/smeserver-mailstats-1.1.bz9888.geoip.patch
ViewVC logotype

Annotation of /rpms/smeserver-mailstats/contribs10/smeserver-mailstats-1.1.bz9888.geoip.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Apr 13 18:12:07 2020 UTC (4 years, 7 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-mailstats-1_1-16_el7_sme, smeserver-mailstats-1_1-13_el7_sme, smeserver-mailstats-1_1-17_el7_sme, smeserver-mailstats-1_1-14_el7_sme, smeserver-mailstats-1_1-11_el7_sme, smeserver-mailstats-1_1-12_el7_sme, smeserver-mailstats-1_1-15_el7_sme, HEAD
Initial import

1 brianr 1.1 diff -Nur smeserver-mailstats-1.1.old/root/usr/bin/spamfilter-stats-7.pl smeserver-mailstats-1.1/root/usr/bin/spamfilter-stats-7.pl
2     --- smeserver-mailstats-1.1.old/root/usr/bin/spamfilter-stats-7.pl 2019-10-18 20:55:55.893000000 -0400
3     +++ smeserver-mailstats-1.1/root/usr/bin/spamfilter-stats-7.pl 2019-10-18 20:56:24.097000000 -0400
4     @@ -24,6 +24,9 @@
5     # bjr - 04Aug16 - Add code to expand the junkmail table to include daily ham and spam and deleted spam for each user - (NFR bugzilla 9716)
6     # bjr - 05Aug16 - Add code to log remote relay incoming emails
7     # bjr - 10Oct16 - Add code to show stats for the smeoptimizer package
8     +# bjr - 16dec16 - Fix dnsbl code to deal with psbl.surriel.com - Bug 9717
9     +# bjr - 16Dec16 - Change geopip table code to show even if no exclusions found (assuming geoip data found) - Bug 9888
10     +# bjr - 30Apr17 - Change Categ index code - Bug 9888 again
11     #
12     #############################################################################
13     #
14     @@ -95,7 +98,7 @@
15    
16     #Configuration section
17     my %opt = (
18     - version => '0.7.10', # please update at each change.
19     + version => '0.7.12', # please update at each change.
20     debug => 0, # guess what ?
21     sendmail => '/usr/sbin/sendmail', # Path to sendmail stub
22     from => 'spamfilter-stats', # Who is the mail from
23     @@ -192,9 +195,15 @@
24     #
25     # Index for certain columns - check these do not move if we add columns
26     #
27     -my $BadCountryCateg=9;
28     -my $DMARCcateg = 5; #Not used.
29     -my $KarmaCateg=$BadCountryCateg+3;
30     +#my $BadCountryCateg=9;
31     +#my $DMARCcateg = 5; #Not used.
32     +#my $KarmaCateg=$BadCountryCateg+3;
33     +
34     +my %categindex;
35     +@categindex{@categs} = (0..$#categs);
36     +my $BadCountryCateg=$categindex{$CATBADCOUNTRIES};
37     +my $DMARCcateg = $categindex{$CATDMARC}; #Not used.
38     +my $KarmaCateg=$categindex{$CATKARMA};
39    
40     my $above15 = 0;
41     my $RBLcount = 0;
42     @@ -1228,7 +1237,7 @@
43    
44     if ($enableSARules) {show_SARules_codes();}
45    
46     - if ($enableGeoiptable and $finaldisplay[$BadCountryCateg]){show_Geoip_results();}
47     + if ($enableGeoiptable and (($total_countries > 0) or $finaldisplay[$BadCountryCateg])){show_Geoip_results();}
48    
49     if ($enablejunkMailList) {List_Junkmail();}
50    
51     @@ -1439,12 +1448,12 @@
52     sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
53    
54     sub get_domain
55     -{ #my $url= URI->new(shift);
56     - #my $domain = $url->host;
57     - my $url = shift;
58     +{ my $url = shift;
59     + $url =~ s!^\(dnsbl\)\s!!;
60     $url =~ s!^.*https?://(?:www\.)?!!i;
61     $url =~ s!/.*!!;
62     $url =~ s/[\?\#\:].*//;
63     + $url =~ s/^([\d]{1,3}.){4}//;
64     my $domain = trim($url);
65     return $domain;
66     }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed